pfefferf / ui5-nwabap-deployer

UI5 Deployer for SAP NetWeaver ABAP
Apache License 2.0
55 stars 18 forks source link

Added Error Handling for testmode #52

Closed Fjaoos closed 3 years ago

Fjaoos commented 3 years ago

As mentioned in the previous pull request: https://github.com/pfefferf/ui5-nwabap-deployer/pull/51

The previous changes did not take into consideration, that the testmode will always return the status code 403.

If the response does contain the message /UI5/UI5_REP_LOAD/004 though, the test was successful and must not throw an error.

pfefferf commented 3 years ago

Cannot reproduce that behavior you describe; and I do not want to have a hard coded check on a backend message.

Fjaoos commented 3 years ago

Hi @pfefferf,

I used an application that would be deployed successfull. If I use the testMode though, the response has the status code 403 and the mentioned message. From my understanding of the class /UI5/CL_ABAP_REPOSITOR_DPC_EXT this is as intended.

The class UI5ABAPRepoClient does check, if the status code is ok (200), created (201) and no_content(204). Otherwise an error will be thrown. This is also the case if the response does have the property body.errordetails.

This is not the case in my scenario though: image

Can you please share your test?

pfefferf commented 3 years ago

What SAP_UI component version do you have installed? Is there no "errordetails" array in your response?

Fjaoos commented 3 years ago

System 1: SAP_UI 755 SP 2 errordetails can be found at body.error.innererror.errordetails image

System 2: SAP_UI 754 SP 4 errordetails can be found at body.error.innererror image

pfefferf commented 3 years ago

Thx for the details. I have enhanced the core and releasepatch version v2.2.1

Fjaoos commented 3 years ago

Thank you very much and please excuse my premature PRs.

pfefferf commented 3 years ago

No worry, thx for the contributions.

treee111 commented 2 years ago

Hi @Fjaoos, may I ask how you integrate the testMode call into your CI/CD pipeline and work with the response/status code?

In my scenario, I think of calling the deployer using testMode to check if there are any changes to deploy.

How can I get the response by calling the deployer tool using bash? If I run it locally, I can't see if there is something to deploy imo. This is if I run in VSCode: image

thanks in advance!