Skip to content

Error handling and error propagation #403

@bevzzz

Description

@bevzzz

Errors received in REST / gRPC requests are ignored silently as the client does not check the response's status code or gRPC reply "status" field before parsing results.

Oftentimes a failed request simple returns an empty response object, making error handling difficult.
We want to be able to do at least this:

  • check response status codes in REST requests
  • decode error responses separately from "successful" responses
  • declare custom WeaviateException or similar and throw it for bad status codes
  • throw on non-SUCCESS statuses from gRPC calls
  • identify common error scenarios and create dedicated exceptions for those that can be handled client-side at runtime (e.g. "retriable"?

Additionally, we need to pay close attention to how error handling works in async client, where users are likely to forget that async code fails differently. For example, our AsyncPaginator needs to fail fast and report its errors correctly.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions