Closed Som-Som-CC closed 10 months ago
It is a bit unclear what to do with the body on the server/lambda side. If no error detail is added e.g. using NewError()
or err.ProblemDetails()
, then the body could be proxied.
If the API consumer is a 3rd party, then one may not want to expose all the internal error details. Like DB node psql1.company.net not reachable. User: funny-app. DB error: TLS certificate expired on 01-01-2024.
When client receives error status code, e.g. on
Post() err
, thenGetErrStatusCode(err) int
returns the status code. But the body and related content-type is not available for the client app. It would be nice to extendError
with these. Probably with some limitation on body size to 1kB.