router
router copied to clipboard
Improve error handling for coprocessor responses
When a coprocessor returns some invalid data, you now get an HTTP 500 with extension code "EXTERNAL_CALL_ERROR" instead of "INTERNAL_SERVER_ERROR", and a slightly improved error message that mentions the coprocessor.
Additionally removes some potential for errors by not deserializing the SDL and the query plan from a coprocessor response.
Todos
- [ ] A changeset
- [ ] Update the docs to discourage responding with read-only keys like "queryPlan" and "sdl"
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
- [ ] Changes are compatible[^1]
- [ ] Documentation[^2] completed
- [ ] Performance impact assessed and acceptable
- [ ] Metrics and logs are added[^3] and documented
- Tests added and passing[^4]
- [ ] Unit Tests
- [x] Integration Tests
- [ ] Manual Tests
Exceptions
Note any exceptions here
Notes
[^1]: It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.
[^2]: Configuration is an important part of many changes. Where applicable please try to document configuration examples.
[^3]: A lot of (if not most) features benefit from built-in observability and debug-level logs. Please read this guidance on metrics best-practices.
[^4]: Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.
@goto-bus-stop, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.
✅ Docs preview has no changes
The preview was not built because there were no changes.
Build ID: 75d7691ec6baa0342bdf91ed
✅ Docs preview has no changes
The preview was not built because there were no changes.
Build ID: 90a890da3aceeac8f1258b84