openmeterio / openmeter

Cloud Metering for AI, Billing and FinOps. Collect and aggregate millions of usage events in real-time.
https://openmeter.io
Apache License 2.0
1.12k stars 68 forks source link

Return RFC7807 type errors #107

Closed sagikazarmark closed 1 year ago

sagikazarmark commented 1 year ago

Preflight Checklist

Problem Description

Currently we return a custom error format to clients. While that's not necessarily a problem, some standardisation would be nice.

Proposed Solution

Return errors formatted according to RFC7807.

A library I've used in the past: https://github.com/moogar0880/problems

Alternatives Considered

Given the size of the library, we could just implement our own problem types.

Additional Information

No response

sagikazarmark commented 1 year ago

@tothandras is this done?

tothandras commented 1 year ago

@sagikazarmark let me know if you find this acceptable:

sagikazarmark commented 1 year ago

lgtm