-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Sort acceptable content-types in error messages #3518
Sort acceptable content-types in error messages #3518
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Just a few notes, then I think this is good to go.
I'm not sure what you mean here. There's no compression on error storage (the strings are generated when you print their description) and I'm not sure what you mean by "error counter". In any case, the sorting should help with readability and figuring out whether your particular type is in the list or not. |
79334c4
to
0eb8042
Compare
We store all error texts in a database, group them by uniq text and then count. So, having lots of kinda different errors affects both the storage and the counter |
|
@jshier, could you please revisit the PR? 🙏 |
0eb8042
to
58e6227
Compare
|
That's strange 🤔 I tested locally: everything is ok on all the platforms (some macOS tests very flaky, though, but not my new one) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the better test. I have some naming notes, otherwise it looks good.
58e6227
to
f569d3d
Compare
|
@jshier 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good, thanks!
|
@jshier, thanks for the review! |
|
Yes, this will go out with out next release. I'm aiming to do it around the time Apple releases Xcode 13.2. |
Co-authored-by: Timur Yusipov <tryusipov@avito.ru>

Goals ⚽
To make serialization error texts less random which comes in handy when you log those errors from you mobile apps.
Currently I get errors like:
where acceptable types are listed in a random order. By making error texts more deterministic we get better compression on the errors storage and also a more reliable error counter