pfefferf / ui5-nwabap-deployer

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

add length check of errordetails #55

Closed benediktvolke closed 3 years ago

benediktvolke commented 3 years ago

If you use ui5-nwabap-deployer@2.1.0 with SAP_UI 750 the upload did not work, but there is no error and the console log says:

info builder:customtask:nwabap-deployer UI5 sources successfully deployed.
info builder:builder Build succeeded in 1.51 s
info builder:builder Executing cleanup tasks...

This happens because the server respond with:

...
body {
  error: {
    code: '/IWFND/MED/170',
    message: {
      lang: 'de',
      value: "Kein Service für Namensraum '/UI5/', Name 'ABAP_REPOSITORY_SRV', Version '0001' gefunden"
    },
    innererror: {
      application: [Object],
      transactionid: 'CF81DA256D620070E0060FCC08FCE041',
      timestamp: '20210809090410.1138300',
      Error_Resolution: [Object],
      errordetails: []
    }
  }
}
...

https://launchpad.support.sap.com/#/notes/0002999557

Here the errordetails attribute is an empty array and therefore no error is thrown. That's why i added a check for empty array and when it is empty the function doesResponseContainAnError compares the status code of the response.