We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the custom subclass example at https://github.com/vapor-ware/fastapi-rfc7807/blob/master/examples/basic.py, I have a similar construct below. However, I don't understand why it returns a str and not json. The fastapi-rfc7807 code processing the custom subclass is at
fastapi-rfc7807/fastapi_rfc7807/middleware.py
Line 110 in 46dd142
My code is:
from fastapi_rfc7807.middleware import Problem class TableNotFoundError(Problem): """ """ headers = { 'WWW-Authenticate': 'Bearer', } def __init__(self, msg: str) -> None: super(TableNotFoundError, self).__init__( status=500, detail=msg, ) try: do_something(name) except: raise TableNotFoundError("Unknown table: %r" % name)
The response is:
TableNotFoundError: Problem:<{'type': 'about:blank', 'title': 'Internal Server Error', 'status': 500, 'detail': "Unknown table: 'hippo'"}>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using the custom subclass example at https://github.com/vapor-ware/fastapi-rfc7807/blob/master/examples/basic.py, I have a similar construct below. However, I don't understand why it returns a str and not json. The fastapi-rfc7807 code processing the custom subclass is at
fastapi-rfc7807/fastapi_rfc7807/middleware.py
Line 110 in 46dd142
My code is:
The response is:
TableNotFoundError: Problem:<{'type': 'about:blank', 'title': 'Internal Server Error', 'status': 500, 'detail': "Unknown table: 'hippo'"}>
The text was updated successfully, but these errors were encountered: