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 network error messages #4704

Merged
merged 6 commits into from
Jul 1, 2023
Merged

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jun 25, 2023

Description

Previously, some network errors would print 0 as their status code. This was because no status code was set for the reply. Instead, the error was in QNetworkReply::error which wasn't used in error reporting. It's now used - if available, the HTTP status is still preferred.

I couldn't really come up with a good test case for NetworkRequest to test that the error is actually set.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/common/NetworkPrivate.cpp Outdated Show resolved Hide resolved
src/common/NetworkResult.hpp Outdated Show resolved Hide resolved
src/common/NetworkResult.hpp Outdated Show resolved Hide resolved
src/common/NetworkResult.hpp Outdated Show resolved Hide resolved
src/common/NetworkResult.hpp Outdated Show resolved Hide resolved
src/singletons/Updates.cpp Outdated Show resolved Hide resolved
src/singletons/Updates.cpp Outdated Show resolved Hide resolved
src/providers/seventv/SeventvEmotes.cpp Outdated Show resolved Hide resolved
src/providers/ffz/FfzEmotes.cpp Outdated Show resolved Hide resolved
src/providers/bttv/BttvEmotes.cpp Outdated Show resolved Hide resolved
src/providers/RecentMessagesApi.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/common/NetworkPrivate.cpp Show resolved Hide resolved
@pajlada pajlada enabled auto-merge (squash) July 1, 2023 12:04
@pajlada pajlada merged commit 22b290c into Chatterino:master Jul 1, 2023
15 of 16 checks passed
@Nerixyz Nerixyz deleted the refactor/net-error branch July 1, 2023 13:01
@Nerixyz Nerixyz mentioned this pull request Oct 19, 2023
4 tasks
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.

None yet

2 participants