integreat-io / integreat

Node.js integration layer
Other
14 stars 3 forks source link

Implement `origin` for response errors #224

Closed kjellmorten closed 1 year ago

kjellmorten commented 1 year ago

The response object should have an origin prop, that may be set when setting an error/status to indicate where that error first arose.

If a service sets origin, it should probably be prefixed, to make sure it doesn't conflict with internal origins.

Other possible origins: mutate:request, mutate:response, auth:action, auth:data, handler, handler:GET (and similar), dispatch, etc.