Needs review
Project:
Brevo: Email Marketing Software (formerly Sendinblue)
Version:
1.2.3
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2025 at 16:40 UTC
Updated:
25 Oct 2026 at 04:26 UTC
Jump to comment: Most recent
Comments
Comment #2
mdruilhe commentedComment #4
mrshowermanI have the same error, and the patch from the MR fixes it.
Left a nit on the MR. Raised the priority, because I think it is a real problem if existing users can't subscribe to another list.
Comment #5
szato commentedGot the same error, plus:
RequestException: Invalid list id, invalid_parameterThe implemented change fixed my issue for subscribing to a same list if contact already exists.
Using module 1.2.3 version with getbrevo/brevo-php v2.0.14.
All these API calls:
addContactToList()removeContactFromList()should have $body (the contact object) as the first argument and $listId as the second argument, but parameters are swapped causing the API to receive the list ID in the body parameter position and vice versa, resulting in the "invalid_parameter" error from Brevo's API.
Comment #7
tostinni commentedOn top of the argument-order fix already in this MR, this also handles the "already subscribed" case that this issue is titled after.
When subscribing a contact that is already in the target list, Brevo answers addContactToList() with HTTP 400 / code "invalid_parameter" and the message "Contact already in list and can't be added again". handleRequestException() turns that into a form error, so a returning subscriber sees a failure even though the contact already is in the desired state (subscribed).
This change adds an isContactAlreadyInListException() helper that inspects the API error body (code == invalid_parameter + "contact already in list" in the message) and, on the two addContactToList() call sites, skips handleRequestException() for that specific case only — every other error is still surfaced as before.
No behavior change for genuine failures.