Skip to content

Improve error messages #9

@blaix

Description

@blaix
  • Specific error(s) for failed queries: Currently, if a request fails due to a bad database query (e.g. a unique constraint fails, you reference a column that doesn't exist, etc), we can't get a helpful error message because of No way to parse response body for HttpClient.BadStatus gren-lang/node#28 - When that issue is fixed, we should parse the error from the response body json. See https://germ.gitbook.io/ws4sqlite/documentation/errors
  • Specific error(s) for failed decoding: Currently if decoding fails you get a confusing message about a response body. This comes from the HttpClient failure. To fix this we should probably be decoding to a Value and decode the value separately from the HTTP request.
  • Specific error(s) when response JSON includes errors: In certain situations the JSON will be different due to error information in the response. Currently this results in cryptic response json parsing error.
  • Specific error(s) when the server is unreachable or returns 4xx/5xx errors (e.g. 404 if you forget to specify the db name in the url).
  • It will also help when ws4sql gets error logging so you can at least see the error in the logs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions