Closed aleksa-krolls closed 12 hours ago
hey @josephjclark - this is the http error issue we discussed today on slack. Assign back to me if you want Hunter/Mtuchi to work on this next week.
Hey somehow I only just saw this! This is actually a core issue, but I'll be fixing it in kit soon (I've crosslinked the issue)
Issue
I'm running this postPatient.js job against this sample payload using the latest version of the http adaptor.
In app, in the
Log
I see a very verbose and helpful response. In my next workflow step, I would like to map some of these error details (e.g.,resourceType
,issue
,meta
) to a postgresql database to keep an external log of errors faced when migrating data to my fhir app.However, in
Output
this response is not captured in theerrors
object, which is left blank.Ideally
errors
should show me as much as possible from the API response!See example run failure on app.openfn.org: https://app.openfn.org/projects/d52bd48e-451b-4a92-9aad-e7c62a7f0923/w/79930c19-1ce1-4144-82ab-e10d7652e2b5?a=b827f1ff-5723-45a1-aee8-9485afaffcac&m=expand&s=a3b64302-94f1-4cb5-9490-ba87eb6dd6c6#output
workaround
The below job using
(errors: { 400: false }
allows us to add API response from failed http request to our final state.