This message was deleted.
# ask-for-help
s
This message was deleted.
s
You can do the same by raising BentoMLExceptions, like BadInput, NotFound, ServiceUnavailable. We don’t currently support configurable error_code, though that may not be a bad idea.
e
Thanks!
500
is the only error I can think of that would be useful at the moment. • We've seen that Bento returns
503
when it gets overwhelmed • We run it behind AWS API Gateway with Auth0 as an authorizer so
401
and
403
codes are taken care of for us. The main thing I'd want is to be able to return a description of what happened in the response message, and a trace-id in the headers (which wasn't present when I tried raising an
bentoml.exceptions.InternalServerError
just now)
s
We currently pass through 4xx error messaging but explicitly hide 5xx error message to not leak server side states to the client. It’s possible to put a config to allow message pass through.
💡 1
👀 1
Regarding trace id, while it’s possible to return the trace id as a header, a more common pattern is to set the trace id in the request. That way, the caller can just pass through its own trace id, and when error occurs, knows the trace id implicitly.
e
Usually in the request headers, right?
It's possible to put a config to allow message pass through
Is there documentation on this?
The caller can pass through its own trace ID
I know Bento supports OpenTelemetry, does that include automatically propagating the "baggage" headers, including picking up the trace/span ID from request headers and using that one in log statements?
s
I know Bento supports OpenTelemetry, does that include automatically propagating the “baggage” headers, including picking up the trace/span ID from request headers and using that one in log statements?
Yes. It will respect the trace context passed in and emit the parent-child span correctly.
👍 1
Is there documentation on this?
Sorry I might have confused you. I meant that this feature, i.e. server error message passthrough, does not exist yet. It can be implemented by adding a config flag.
e
Oh I see