Skip to content

Conversation

@kevinpagtakhan
Copy link
Collaborator

Summary

While testing the SDK, I tried sending an event with deviceId of 1 as number. The response as expected is a 400 error, but surprisingly with this payload:

{
  "code":400,
  "events_with_invalid_id_lengths":{
    "device_id":[0]
  },
  "error":"Invalid id length for user_id or device_id"
}

The field events_with_invalid_id_lengths is not documented in developer docs and was not initially handled.

The changes inspects the optional field of events_with_invalid_id_lengths and considers its contents to determine which events will be retried.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: No

@kevinpagtakhan kevinpagtakhan force-pushed the AMP-51995-400-error-invalid-id-lengths branch from 7168c7b to f9b60fc Compare April 9, 2022 08:29
@kevinpagtakhan kevinpagtakhan merged commit fd1686f into main Apr 12, 2022
@kevinpagtakhan kevinpagtakhan deleted the AMP-51995-400-error-invalid-id-lengths branch April 12, 2022 17:01
curiousYi pushed a commit to curiousYi/Amplitude-TypeScript that referenced this pull request Jan 26, 2023
* adding singilar docs

* Fixing broken relative link
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

Successfully merging this pull request may close these issues.

3 participants