Skip to content
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

Sending a user_id of a number will 200 but event won't show in Dashboard #63

Open
tom-james-watson opened this issue Nov 18, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@tom-james-watson
Copy link

tom-james-watson commented Nov 18, 2020

If I send a user_id of 123, I get a 200 response, but the event never appears in the web app, although I can see it in the "Successful requests" in "Sources".

Expected Behavior

400 response, as user_id should be a string

@tom-james-watson tom-james-watson added the bug Something isn't working label Nov 18, 2020
@haoliu-amp
Copy link
Contributor

Hello, user_id should be a string type.

@tom-james-watson
Copy link
Author

Yeah I understand that, therefore the fact that you can send an integer and not get an error response, and have the event silently disappear, is a bug.

@kelvin-lu
Copy link
Contributor

@tom-james-watson in your 200 response, do you have logs of the other metadata? e.g. how many events were ingested. in 1.0.x and onwards there is an issue where we silently throw away events with neither user nor device id.

when I hit the http api with 123 I get a different response - it errors because it is too short. I've found that creating numeric user ids of length > 5 do get accepted though.

@tom-james-watson
Copy link
Author

tom-james-watson commented Nov 18, 2020 via email

@Galkon
Copy link

Galkon commented Mar 2, 2021

+1 here, we ran into this and were stuck on it for over a day. It's easy to overlook, the request should definitely not 200 when it fails to log the event or track anything. We were trying to track "user_id": 15479253 and that would give us a 200, with eventsIngested = 0 in the callback. We finally spotted that it needed to be a string, and we got a 200 with eventsIngested = 1.

Amplitude should handle invalid data in a better way.

@kelvin-lu
Copy link
Contributor

Hey @Galkon ,

Sorry to hear that. We'll pass this on to our data ingestion team for the response being returned by the HTTP v2 API, and also include some better tooling in this SDK to validate the events better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants