Leanplum / Leanplum-Android-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
46 stars 40 forks source link

Add API message error to response exception #483

Closed opengamer29 closed 2 years ago

opengamer29 commented 2 years ago
What Where/Who
JIRA Issue NONE
People Involved NONE

Sorry for opening another PR again (I know that "you currently do NOT accept any feature request PRs"). But it really will help us to understand what's going on with some of our users.

Background

Feature to catch all exceptions inside SDK appeared in 5.9.0, but there is only a status code in API exceptions. Having also an API error message will help to understand the actual reason.

Implementation

Just add an API error message to Exception (maybe it's reasonable to fetch response.error.message from JSON, instead of adding the whole response).

Testing steps

Ensure that Leanplum SDK correctly sends requests and processes errors as expected.

Is this change backwards-compatible?

Yes

opengamer29 commented 2 years ago

Sorry for pinging you here, but are you planning to release a new version with these changes in the nearest feature?

hborisoff commented 2 years ago

@opengamer29 We are working on a new release and I hope it will be live next week.

opengamer29 commented 2 years ago

Great, thanks.

hborisoff commented 2 years ago

@opengamer29 We just released the SDK 5.10.0 including your changes.

opengamer29 commented 2 years ago

@opengamer29 We just released the SDK 5.10.0 including your changes.

Great, thanks.