amplitude / Amplitude-Node

Server-side Node.js SDK for Amplitude
MIT License
67 stars 20 forks source link

feat(transport): Meaningful result on empty API response #168

Open abhudson opened 2 years ago

abhudson commented 2 years ago

Summary

Ensure that the correct HTTP response code gets propagated when the response contains an empty JSON object.

e.g. ensures that a 400 response with empty payload is returned to the client as { "statusCode": 400, "name": "invalid" }, rather than the confusing default { "statusCode": 0, "name": "unknown" }

Can replicate this by sending an identify event with more than 10 elements in a groups entry.

Checklist