You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In combination with #38 , if this reporter could intelligently select a path to display errors for and skip errors/reporting more deeply if the message is getting overwhelmingly long - I think it would make errors easier to grok. Perhaps this truncating behavior ought to be behind a flag or exported separately for people who want full errors.
Basic example
Decode error for FeedItem: expected one of:
- UserSuggestionFeedItem
- UserPostFeedItem
- PageSuggestionFeedItem
but instead got undefined.
More complex example
Decode error for FeedItem: expected one of:
- UserSuggestionFeedItem
- UserPostFeedItem
- PageSuggestionFeedItem
- { type: "GroupFeedItem", name: string, meta: { ... }, ... }
but value didn't match. Errors for closest match, UserPostFeedItem:
- Expected number at data.numLikes but instead got: "4"
- Expected Date at data.meta.postedAt but instead got: undefined.
- Expected PostType at data.postType but instead got: "Omar Diab"
... and 4 other errors ...
Would potentially be able to be more specific for tagged types.
The text was updated successfully, but these errors were encountered:
Perhaps this truncating behavior ought to be behind a flag or exported separately for people who want full errors.
I think we could implement different reporters for the different use cases instead of having a single one with different options.
Eg. at work we use it for reporting of API validation errors, sending the reporting errors to an error aggregator. So there we need to see all the errors and is not necessary to have a pretty version. But for development something like your examples or what I suggested on #37 would be really nice.
In combination with #38 , if this reporter could intelligently select a path to display errors for and skip errors/reporting more deeply if the message is getting overwhelmingly long - I think it would make errors easier to grok. Perhaps this truncating behavior ought to be behind a flag or exported separately for people who want full errors.
Basic example
More complex example
Would potentially be able to be more specific for tagged types.
The text was updated successfully, but these errors were encountered: