We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A few adaptors have a pattern where they create an Error object and throw it.
This isn't itself unreasonable!
But when serializing that error for the console or the final state, we lose all the detail.
If I console.log this error, I do see some of the properties:
Here you can see my custom status code.
status
The stack trace right now is not useful - although will be once we handle source mapping
The thing we report in the CLI isn't so good:
And the thing we write to state is useless:
No surprises here, it's just getting a better understanding of how different errors are reported out of the runtime
The text was updated successfully, but these errors were encountered:
Probably the code that generates that error object on state should serialize all the keys of the error object into JSON.
And the Runtime log at the end, which says check state for details, should pretty-print the keys nicely too
Sorry, something went wrong.
Maybe related? Posting here
In okd, using http helpers without much wrapping, I see this in my logs:
Ok, it reported a 404, but there's more data in the error response.
State doesn't show anything useful:
{ "data": {}, "errors": { "job-1": { "type": "AdaptorError", "stepId": "job-1", "message": "GET to https://sandbox.getodk.cloud/v1/projects/69 returned 404: Not Found", "error": { "source": "runtime", "type": "AdaptorError", "name": "AdaptorError", "severity": "fail", "message": "GET to https://sandbox.getodk.cloud/v1/projects/69 returned 404: Not Found" } } } }
But the actual Error object that was reported is super rich! This should serialize better!
josephjclark
Successfully merging a pull request may close this issue.
A few adaptors have a pattern where they create an Error object and throw it.
This isn't itself unreasonable!
But when serializing that error for the console or the final state, we lose all the detail.
If I console.log this error, I do see some of the properties:
Here you can see my custom
status
code.The stack trace right now is not useful - although will be once we handle source mapping
The thing we report in the CLI isn't so good:
And the thing we write to state is useless:
No surprises here, it's just getting a better understanding of how different errors are reported out of the runtime
The text was updated successfully, but these errors were encountered: