Standardise error handling

- 400 errors would pass through some functions
- Extraneous `panic()` on error