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

AttributeError: 'InAppPyValidationError' object has no attribute 'raw_response' #60

Open
schumannd opened this issue Dec 5, 2019 · 1 comment
Labels

Comments

@schumannd
Copy link
Contributor

schumannd commented Dec 5, 2019

Description

This error arose while using the recommended error handling from the readme:

except InAppPyValidationError as ex:
    response = ex.raw_response  # contains actual response from AppStore service.
    reporter.send_error_report(response)

Expected Behavior

Shouldn't fail

Actual Behavior

the line before the error gets reported to us failed

Context

this bug was caught by our automated error monitor.
In the breadcrumbs I found, that the URL "https://buy.itunes.apple.com/verifyReceipt" was queried twice:

It returned status code [503] Service Unavailable the first time.
The second time it returned [null].

There was also a JSONDecodeError: Expecting value: line 1 column 1 (char 0) somewhere. Maybe in the InAppPy packet? maybe a handling of a null value return needs to be added somewhere?
And maybe that is why raw_response was not set? It should still exist in the object though to avoid errors like this.

That's a lot of maybes, because unfortunately the bredcrumbs don't show exactly what code line was executed.

Your Environment

inapppy==2.3
Django==2.1
python-3.7.0

@schumannd schumannd added the bug label Dec 5, 2019
@DataGreed
Copy link

Similar problem here.

This seems to be a problem from appstore.py:68 assuming that the response will contain valid json, if it does not, inapppy raises InAppPyValidationError("HTTP error") taht have no useful info at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants