Skip to content

JSONDecoder: added decoding type when logging DecodingError.keyNotFound#2212

Merged
NachoSoto merged 2 commits into
mainfrom
decoding-error-type
Jan 17, 2023
Merged

JSONDecoder: added decoding type when logging DecodingError.keyNotFound#2212
NachoSoto merged 2 commits into
mainfrom
decoding-error-type

Conversation

@NachoSoto

@NachoSoto NachoSoto commented Jan 12, 2023

Copy link
Copy Markdown
Contributor

See TRIAGE-240.

That logged an error:

Key 'CodingKeys(stringValue: "data", intValue: nil)' not found, codingPath: [], description:
No value associated with key CodingKeys(stringValue: "data", intValue: nil) ("data").

But it was impossible to determine where it was coming from.
With this change now we get:

Error deserializing `Response`. Key 'CodingKeys(stringValue: "data", intValue: nil)' not found, codingPath: [], description:
No value associated with key CodingKeys(stringValue: "data", intValue: nil) ("data").

…Found`

See [TRIAGE-240].

That logged an error:
```
Key 'CodingKeys(stringValue: "data", intValue: nil)' not found, codingPath: [], description:
No value associated with key CodingKeys(stringValue: "data", intValue: nil) ("data").
```

But it was impossible to determine where it was coming from.
With this change now we get:
```
Error deserializing `Response`. Key 'CodingKeys(stringValue: "data", intValue: nil)' not found, codingPath: [], description:
No value associated with key CodingKeys(stringValue: "data", intValue: nil) ("data").
```
@NachoSoto NachoSoto requested a review from a team January 12, 2023 21:01
@NachoSoto NachoSoto merged commit b1f6849 into main Jan 17, 2023
@NachoSoto NachoSoto deleted the decoding-error-type branch January 17, 2023 15:13
NachoSoto pushed a commit that referenced this pull request Jan 17, 2023
**This is an automatic release.**

### New Features
* Added new `ReceiptParser.fetchAndParseLocalReceipt` (#2204) via
NachoSoto (@NachoSoto)
* `PurchasesReceiptParser`: added API to parse receipts from `base64`
string (#2200) via NachoSoto (@NachoSoto)
### Bugfixes
* `CustomerInfo`: support parsing schema version 2 to restore SDK `v3.x`
compatibility (#2213) via NachoSoto (@NachoSoto)
### Other Changes
* `JSONDecoder`: added decoding type when logging
`DecodingError.keyNotFound` (#2212) via NachoSoto (@NachoSoto)
* Added `ReceiptParserTests` (#2203) via NachoSoto (@NachoSoto)
* Deploy `PurchaseTester` for `macOS` (#2011) via NachoSoto (@NachoSoto)
* `ReceiptFetcher`: refactored implementation to log error when failing
to fetch receipt (#2202) via NachoSoto (@NachoSoto)
* `PostReceiptDataOperation`: replaced receipt `base64` with `hash` for
cache key (#2199) via NachoSoto (@NachoSoto)
* `PurchaseTester`: small refactor to simplify `Date` formatting (#2210)
via NachoSoto (@NachoSoto)
* `PurchasesReceiptParser`: improved documentation to reference
`default` (#2197) via NachoSoto (@NachoSoto)
* Created `CachingTrialOrIntroPriceEligibilityChecker` (#2007) via
NachoSoto (@NachoSoto)
* Update Gemfile.lock (#2205) via Cesar de la Vega (@vegaro)
* remove stalebot in favor of SLAs in Zendesk (#2196) via Andy Boedo
(@aboedo)
* Update fastlane-plugin-revenuecat_internal to latest version (#2194)
via Cesar de la Vega (@vegaro)
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

Successfully merging this pull request may close these issues.

2 participants