You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue calling the unitofwork endpoint: "body must have required property 'data'" #3
When following the Getting Started guide, in the step where we call the Heroku API from APEX, when we execute the unitofwork call we get the following error:
InvokeHerokuAPI.postUnitOfWork();
FAILED!: 400 {"statusCode":400,"code":"FST_ERR_VALIDATION","error":"Bad Request","message":"body must have required property 'data'"}
The problem is that the index.js that handles the route for unitofwork is expecting the payload to have a "data" node:
However, the api-spec.yaml does not specify the same payload format:
Since dynamic Apex classes are based on the api-spec.yaml definition, there's no "data" attribute on the HerokuAPI_UnitOfWork_IN_body class.
Either the api-spec.yaml or the route logic in index.js needs to be modified to use the same payload definition. I suspect that it would be easier to modify the logic in index.js since all other modifications would require changing the Apex code in the Getting Started guide.
Activity
solve issue heroku-reference-apps#3: Issue calling the unitofwork end…
Merge pull request #4 from gmodica/main