HackSoftware/Django-Styleguide

Error structuring according to RFC7807

duebbert opened this issue ยท 4 comments

Have you considered RFC7807 (https://datatracker.ietf.org/doc/html/rfc7807) as a way of structuring errors? I haven't seen it much in the wild but I am always in favour of using standards where possible. Just wondering if you are aware of it and if so what arguments were against using it. Thanks!

Some projects that implemented it:
https://github.com/vapor-ware/fastapi-rfc7807
https://github.com/cbornet/python-httpproblem
https://github.com/dave-shawley/tornado-problem-details

Hello @duebbert ๐Ÿ‘‹

We haven't specifically used RFC7807, but it seems quite reasonable ๐Ÿ‘

I'll add a mention to it in this particular section - https://github.com/HackSoftware/Django-Styleguide#errors--exception-handling

Thanks for the issue ๐Ÿ™Œ

Added a mention here - 231773a

Cheers!

Closing for now. If you want to add something else, feel free to reopen ๐Ÿ™Œ

Came across this which might be useful too, although not RFC7807: https://github.com/ghazi-git/drf-standardized-errors