Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Notifier][Sendinblue] Handle error responses without a message key#52095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| if (201 !==$statusCode) { | ||
| thrownewHttpTransportException('Unable to send an email:'.$result['message'].sprintf(' (code %d).',$statusCode),$response); | ||
| thrownewHttpTransportException('Unable to send an email:'.($error['message'] ??$response->getContent(false)).sprintf(' (code %d).',$statusCode),$response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| thrownewHttpTransportException('Unable to send an email:'.($error['message'] ??$response->getContent(false)).sprintf(' (code %d).',$statusCode),$response); | |
| thrownewHttpTransportException('Unable to send an email:'.($result['message'] ??$response->getContent(false)).sprintf(' (code %d).',$statusCode),$response); |
OskarStark commentedOct 17, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
As Brevo is the 1:1 replacement for Sendinblue after their rebranding, can you please also update Mailer/Brevo and Notifier/Brevo bridges? Thanks |
stof commentedOct 17, 2023
@OskarStark done in#52096 as the Brevo transports only exist in the 6.4 branch, not in 5.4 |
a9fb5e5 to8ae8993Comparenicolas-grekas commentedOct 17, 2023
Thank you@stof. |
…e key (stof)This PR was merged into the 6.4 branch.Discussion----------[Notifier] [Brevo] Handle error responses without a message key| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets || License | MITDuring their outage yesterday where the endpoint returned errors with status code 500, there was no message key in the json response.This avoids a notice when the key does not exist. Instead, it uses the full response content, as done when the decoding fails.This is the same change than#52095 but for the new Brevo bridgeCommits-------517ceae Handle Brevo error responses without a message key
…e key (stof)This PR was merged into the 6.4 branch.Discussion----------[Notifier] [Brevo] Handle error responses without a message key| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets || License | MITDuring their outage yesterday where the endpoint returned errors with status code 500, there was no message key in the json response.This avoids a notice when the key does not exist. Instead, it uses the full response content, as done when the decoding fails.This is the same change thansymfony/symfony#52095 but for the new Brevo bridgeCommits-------517ceaea03 Handle Brevo error responses without a message key
…e key (stof)This PR was merged into the 6.4 branch.Discussion----------[Notifier] [Brevo] Handle error responses without a message key| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets || License | MITDuring their outage yesterday where the endpoint returned errors with status code 500, there was no message key in the json response.This avoids a notice when the key does not exist. Instead, it uses the full response content, as done when the decoding fails.This is the same change thansymfony/symfony#52095 but for the new Brevo bridgeCommits-------517ceaea03 Handle Brevo error responses without a message key
During their outage yesterday where the endpoint returned errors with status code 500, there was no
messagekey in the json response.This avoids a notice when the key does not exist. Instead, it uses the full response content, as done when the decoding fails.