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

JSONException on 405 error #7

Open
rougou opened this issue Dec 10, 2020 · 0 comments
Open

JSONException on 405 error #7

rougou opened this issue Dec 10, 2020 · 0 comments

Comments

@rougou
Copy link

rougou commented Dec 10, 2020

Hi, we got the following exception calling updateCheckoutSession in our production (LIVE) environment.
Not sure the cause of the 405 to begin with, but the SDK attempts to convert the response to JSON despite it being HTML.

A JSONObject text must begin with '{' at character 1 of <html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>Server</center>
</body>
</html>
net.sf.json.JSONException: A JSONObject text must begin with '{' at character 1 of <html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>Server</center>
</body>
</html>
        at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:499)
        at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:972)
        at net.sf.json.JSONObject._fromString(JSONObject.java:1201)
        at net.sf.json.JSONObject.fromObject(JSONObject.java:165)
        at net.sf.json.JSONObject.fromObject(JSONObject.java:134)
        at com.amazon.pay.api.AmazonPayClient.processRequest(AmazonPayClient.java:215)
        at com.amazon.pay.api.AmazonPayClient.callAPI(AmazonPayClient.java:163)
        at com.amazon.pay.api.WebstoreClient.updateCheckoutSession(WebstoreClient.java:128)
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

No branches or pull requests

1 participant