This message was deleted.
# ask-for-help
s
This message was deleted.
j
Hey Jeremy, you could inject any middleware to handle the request/response as you like! https://docs.bentoml.com/en/latest/guides/server.html#asgi-middleware
j
Thank you so much! I will check it out today!
a
Hey @Jian Shen Yap, do I have to inject middleware in order to handle exceptions? I'm looking to customize response instead of the user getting
Copy code
occurred in BentoML user code when handling this request,
when i'm raising an error, Thanks
j
Either you have to do it via a middleware, or you have to build your own fully customized endpoint https://docs.bentoml.com/en/latest/guides/server.html#fully-customized-endpoints We currently don't have any public API to customize error handling with the default endpoints. Would you mind sharing how this feature is important for you? It would help the BentoML team to learn from the community feedback!
a
Thank you. Do i "lose" any bentoml feature if i'm mounting a middleware such as FastAPI?