Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Throw exception when template id don't exist on Brevo #6

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mckenziearts
Copy link
Collaborator

No description provided.

@mckenziearts mckenziearts self-assigned this Aug 16, 2024
@mckenziearts mckenziearts force-pushed the throw-exception-on-templateId branch from 23eefa9 to b12f694 Compare August 16, 2024 09:42
Comment on lines +50 to +54
$templateResponse = $this->http->get('/smtp/templates/' . $email->templateId);

if (! $templateResponse->successful()) {
throw new BrevoException($templateResponse->toPsrResponse());
}
Copy link
Member

@JamesHemery JamesHemery Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: mettre en place du cache pour cette requête ? Qui ne soit pas activé en dev.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question : l'erreur n'est pas remontée directement par l'endpoint send ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non. En gros y'a 2 éléments que je voulais tester. Savoir déjà si le template existe et savoir s'il est actif. Actuellement nous avons aucun retour quand il y'a un souci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants