๐ fix: safeguard `NewAPIError.Error()` against nil pointer panic
Backend โข `types/error.go` โ Return empty string when receiver itself is `nil`. โ If `Err` is `nil`, fall back to `errorCode` string to avoid calling `nil.Error()`. This prevents runtime panics when the error handler builds an OpenAI-style error response but the underlying `Err` field has not been set.
Showing
Please
register
or
sign in
to comment