Skip to content

AmplitudeClient.makeEventUploadPostRequest shall check HTTP response 200 rather than matching string response to "success" #348

@jackcsk

Description

@jackcsk

Summary

In related to the amplitude-javascript pull request amplitude/Amplitude-JavaScript#572, AmplitudeClient.makeEventUploadPostRequest(client, event, maxEventId, maxIdentifyId) shall match Response.code to 200 rather than doing a string comparison of "success"

Current behavior blocks the usage of custom amplitude proxy, which returns HTTP 200 response in this format:

{"code":200,"status":"SUCCESS","data":true}

Error Message

From logcat:

01-27 19:17:55.455 17721 17910 W com.amplitude.api.AmplitudeClient: Upload failed, {"code":200,"status":"SUCCESS","data":true}
01-27 19:17:55.455 17721 17910 W com.amplitude.api.AmplitudeClient: , will attempt to reupload later

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions