question

npariha avatar image
npariha asked

ADM Message post fails with 500 and retryAfter set to null

Hi, We are seeing ADM return HTTP 500 when posting messages, the response content {"retryAfter":"null"}. We expected response to contain the "reason", however it is not present. Why is this happening? Thanks! -Narendra
amazon device messaging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Tom Q. Vaxy avatar image
Tom Q. Vaxy answered
Hi Narendra, If you take another look at the ADM documentation, specifically the "Response Format" section of Sending Messages (at https://developer.amazon.com/sdk/adm/sending-message.html#ResponseFormat ), you will see that for status code 500, no reason is meant to be provided. In general, 500 status refers to an "Internal Error" meaning there is nothing wrong with your request that Amazon can recognize, but it still failed. However, it is strange that you are getting a "retryAfter" field since that same documentation says "retryAfter" is only in the response for 429 and 503. This suggests a bug on Amazon's side to look into.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bipin@Amazon avatar image
Bipin@Amazon answered
Narendra, Can you tell us Formatted HTTPS connection for the POST request and JSON representation of the message. So that we can re-create the scenario to debug the issue. I'm doing the ideal way and followed the example which is working fine. However your request for Description of 500 more than just "There was an internal server error" is taken.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.