You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before migration I checked API doc and changelog and saw that API ruotes and behaviour didn't change.
However, after migration, when testing api/v1/messages/message I realized that the _expansions parameter is not allowed anymore to be a boolean, but only a list of strings with message fields.
My application used the API with "_expansion":true and received a 500 Internal error (while it was working ok in 2.1.4).
If support for expansions as boolean is actually dropped, I suggest to
add a control in app/controllers/legacy_api/messages_controller.rb to check if expansions is actually a list of strings and, it that's the case, return an informative 400 Bad Request/malformed request syntax or something like that (instead of the 500 disorienting message)
Hi, I migrated from 2.1.4 to 3.3.2.
Before migration I checked API doc and changelog and saw that API ruotes and behaviour didn't change.
However, after migration, when testing
api/v1/messages/message
I realized that the_expansions
parameter is not allowed anymore to be a boolean, but only a list of strings with message fields.My application used the API with
"_expansion":true
and received a 500 Internal error (while it was working ok in 2.1.4).If support for
expansions
as boolean is actually dropped, I suggest toadd a control in
app/controllers/legacy_api/messages_controller.rb
to check if expansions is actually a list of strings and, it that's the case, return an informative 400 Bad Request/malformed request syntax or something like that (instead of the 500 disorienting message)update the API doc https://apiv1.postalserver.io/controllers/messages/message.html removing the following sentence about _expansions parameter: "You can send true rather than array to receive all expansions."
Thanks!
The text was updated successfully, but these errors were encountered: