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

Improve display of DecodeError [SDK-3427] #158

Merged
merged 2 commits into from
Jun 14, 2022
Merged

Improve display of DecodeError [SDK-3427] #158

merged 2 commits into from
Jun 14, 2022

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Jun 10, 2022

Changes

This PR gets the DecodeError to conform to LocalizedError and CustomDebugStringConvertible. This way, the custom error message will be correctly displayed however the developer decides to consume it (with String(describing:), or String(reflecting:), or error.localizedDescription, or with a string interpolation).

Screen Shot 2022-06-10 at 00 26 40

The error messages themselves have been reworked as well, and the file Errors.swift was renamed to DecodeError.swift.

Testing

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@Widcket Widcket added the review:small Small review label Jun 10, 2022
@Widcket Widcket requested a review from a team as a code owner June 10, 2022 03:41
@Widcket Widcket changed the title Improve display of DecodeError Improve display of DecodeError [SDK-3427] Jun 10, 2022
Copy link
Member

@evansims evansims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Widcket Widcket merged commit 2eeb223 into fa Jun 14, 2022
@Widcket Widcket deleted the v3/improve-errors branch June 14, 2022 15:05
@Widcket Widcket mentioned this pull request Jun 24, 2022
@Widcket Widcket mentioned this pull request Jul 19, 2022
2 tasks
Widcket added a commit that referenced this pull request Jul 20, 2022
* Remove license header (#140)

* Add migration guide (#141)

* Drop support for old Swift versions [SDK-3394] (#142)

* Drop support for old Swift versions

* Remove Xcode 12 from the build matrix

* Update year in license file (#144)

* Drop old platform versions (#143)

* Update README [SDK-3396] (#147)

* Update README

* Add First Availability label

* Remove ID token validator [SDK-3395] (#145)

* Remove ID token validator

* Add changes to migration guide

* Drop support for Objective-C [SDK-3405] (#149)

* Add `.swiftpm` to `.gitignore` (#151)

* Add CONTRIBUTING.md (#150)

* Add missing unit test (#146)

* Add missing test

* Add empty JSON body test case

* Add support policy [SDK-3403] (#148)

Add support policy

* Update API doc comments (#152)

* Move test files back to `JWTDecodeTests` (#154)

* Update the library description (#153)

Update library description

* Add subscript getter for claims [SDK-3421] (#156)

* Update playground (#157)

* Improve display of `DecodeError` [SDK-3427] (#158)

* Improve errors

* Remove extra whitespace

* Apply recommended Xcode 14 settings (#159)

* Improve API docs (#160)

* [SDK-3434] Update issues templates (#161)

* [SDK-3434] Update issue templates

* Remove "FAQ.md" reference, as there is no file

* Update .github/ISSUE_TEMPLATE/Bug Report.yml

* Update .github/ISSUE_TEMPLATE/Bug Report.yml

* Update .github/ISSUE_TEMPLATE/Feature Request.yml

* Update .github/ISSUE_TEMPLATE/Feature Request.yml

* Update .github/ISSUE_TEMPLATE/config.yml

* Update .github/ISSUE_TEMPLATE/config.yml

* Update checklist grouping

* Update pull request template

Co-authored-by: Rita Zerrizuela <zeta@widcket.com>

* Rename `DecodeError` and error case (#162)

* Use SUT terminology in unit tests (#163)

* Add DocC API generation

* Ignore docs.archive subfolder for temp data

* Add to shiprc

* Implement feedback

* Add generated API documentation to repo

* Update generated API documentation for repo

* Improve API docs generation (#167)

* Re-generate API docs (#169)

* Link to the API docs from the README (#168)

* Release 3.0.0-fa.0 (#170)

* Use Codecov orb (#173)

* Replace OSX with macOS in schemes and targets (#175)

* Add placeholders to issue forms (#176)

* Update README for GA [SDK-3499] (#177)

Update README for GA

* Merge `master` into `fa` (#178)

Co-authored-by: Evan Sims <evan.sims@auth0.com>
Co-authored-by: Evan Sims <evan.sims@okta.com>
@Widcket Widcket mentioned this pull request Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants