aiondemand / aiondemand/AIOD-rest-api

adopt rfc7807

Aperta
#85 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement good first issue priority
Lingua principale
Python
Stelle
36
Fork
78
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The default error handling of FastAPI is a bit weird. You get response bodies such as
```
{"detail":
[
{"loc": ["body", "title"], "msg": "field required", "type": "value_error.missing"}
]
}
```

This is not conform https://datatracker.ietf.org/doc/html/rfc7807. We want to conform to an international standard. As far as I know, rfc7807 is the most used international standard for error handling.

TODOs:
1. check if rfc7807 is the best international standard to comply to
2. make sure errors are rfc7807 compliant
3. maybe check all the errors that are thrown around, and improve on then, to improve the user /developers experience

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.