adobe / aio-cli-plugin-app-dev

App Builder CLI - dev command
Apache License 2.0
0 stars 1 forks source link

syntax error in action function should match error in Runtime server #71

Closed shazron closed 4 weeks ago

shazron commented 1 month ago

Line: https://github.com/adobe/aio-cli-plugin-app-dev/blame/cc692e5185e109f95655e2b35fc58b860a82f805/src/lib/run-dev.js#L346

The error message there does not match what is output from the Runtime server. The HTTP status returned should be 400, and an object:

{
  "code": "some_error_Code",
  "error": "Response is not valid 'message/http'."
}

This needs to be changed in https://github.com/adobe/aio-cli-plugin-app-dev/blob/cc692e5185e109f95655e2b35fc58b860a82f805/e2e/e2e.js#L186 as well.

I verified this in Runtime, by uploading the test action we have that has invalid syntax, using aio rt action update, and it gave the expected response above.

aiojbot commented 1 month ago

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-3083