Skip to content

ALB integration returns status code 500 when body field is null #438

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

Closed
bmoffatt opened this issue Apr 7, 2022 · 1 comment
Closed

ALB integration returns status code 500 when body field is null #438

bmoffatt opened this issue Apr 7, 2022 · 1 comment

Comments

@bmoffatt
Copy link
Collaborator

bmoffatt commented Apr 7, 2022

Verified that ALB does as you say, 502 returned with json {"statusCode": 200, "body": null} but expect 200 returned when json is {"statusCode": 200}. The go struct isn't actually able to produce this, since the type is string rather than *string.

So... I think it's OK to represent in this model that null should never be written for this integration. As far as I can tell in my testing it's also harmless to drop the empty string body, ALB behaves the same way.

I was referencing this issue recently in a discussion, and realized that the change modified the request, not the response - so the issue described of a 5xx on the response path still exists.

Originally posted by @bmoffatt in #408 (comment)

@bmoffatt
Copy link
Collaborator Author

no issue

The go struct isn't actually able to produce this, since the type is string rather than *string

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

No branches or pull requests

1 participant