feat(davinci-client): normalize error details#134
Conversation
🦋 Changeset detectedLatest commit: 15e8c8a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
View your CI Pipeline Execution ↗ for commit 15e8c8a.
☁️ Nx Cloud last updated this comment at |
|
Deployed 72f41dd to https://ForgeRock.github.io/ping-javascript-sdk/pr-134/72f41dda92bb73043312b111cc9a757f9308cc85 branch gh-pages in ForgeRock/ping-javascript-sdk |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #134 +/- ##
==========================================
+ Coverage 46.88% 54.41% +7.52%
==========================================
Files 29 21 -8
Lines 1284 1145 -139
Branches 154 160 +6
==========================================
+ Hits 602 623 +21
+ Misses 682 522 -160
|
| }); | ||
|
|
||
| return acc; | ||
| }, [] as CollectorErrors[]); |
There was a problem hiding this comment.
Maybe nitpicky but you can remove the as cast here
and use the generic on Reduce
return details.reduce<CollectorErrors[]>((acc, next) =>...
ryanbas21
left a comment
There was a problem hiding this comment.
+1 for better errors. Only one comment feel free to address if you want to, it a little nitpicky.
0020da3 to
15e8c8a
Compare
JIRA Ticket
Jira ticket
Description
This removes the less valuable
detailsproperty from the error node and replaces it with a more valuablecollectorsproperty of theerrorobject. This isn't exactly backwards compatible, but I consider thedetailsproperty on the normalized ErrorNode to be a bug. This replaces it with a way more valuable collector list of collectors that are not valid.