-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hi !
When working with this API, I'm facing difficulties getting the Sendinblue API error message.
result, resp, err := sib.TransactionalEmailsApi.SendTransacEmail(ctx, sendinblueMail)
if err != nil {
log.Println("Error when calling TransactionalEmailsApi->SendTransacEmail:", err.Error())
return c.Status(resp.StatusCode).SendString(err.Error())
}
I'm only getting the generic error message :
2023/05/26 09:42:05 Error when calling TransactionalEmailsApi->SendTransacEmail: 400 Bad Request
When I want to get the specific message like :
{
"code": "invalid_parameter",
"message": "File extension mismatch in 'url' & 'name' passed in the request"
}
How to get that from the err
variable, since the response object body has already been read and closed, we can not extract it again.
Thank you
manjurulhoque
Metadata
Metadata
Assignees
Labels
No labels