Skip to content

[Bug]: provide a better error message than Network Error: # on nextcloudcmd #8369

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

Open
4 of 8 tasks
trajano opened this issue Jun 12, 2025 · 3 comments
Open
4 of 8 tasks

Comments

@trajano
Copy link

trajano commented Jun 12, 2025

⚠️ Before submitting, please verify the following: ⚠️

Bug description

The error message on the BulkPropagatorJob looks like this

  Could not complete propagation of ... by OCC::BulkPropagatorJob(0x557c662c70) with status OCC::SyncFileItem::NormalError and error: "Network error: 2"

The problem is it's just hard to figure out what the 2 or 5 or whatever means.

Steps to reproduce

It's a log event.

Expected behavior

Something like

Network error: 2: got a HTTP 502 error code from the server"

Which files are affected by this bug

abortWithError(singleFile._item, SyncFileItem::NormalError, tr("Network error: %1").arg(jobError));

Operating system

Linux

Which version of the operating system you are running.

Raspbian

Package

Distro package manager

Nextcloud Server version

31.0.6

Nextcloud Desktop Client version

Nextcloud version 3.7.3git

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 3.4.2 to 3.4.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Enabled

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Server logs

Additional info

#7001

@nilsding
Copy link
Member

Thanks for the suggestion, I agree that this error message should be improved.

In the case of this particular log message, the numeric value comes from the QNetworkReply::NetworkError enum.

While looking at that table I also noticed that e.g. the value of QNetworkReply::ServiceUnavailableError is not 503, but 403 which means something entirely different in the context of HTTP response codes. This definitely doesn't help with diagnosing issues...

@trajano
Copy link
Author

trajano commented Jun 12, 2025

QNetworkReply::NetworkError enum.

Thank you. I was looking around for it for a an hour last night. I didn't realize it's part of QT rather than this project.

@trajano
Copy link
Author

trajano commented Jun 12, 2025

Though...

QNetworkReply::OperationCanceledError | 5 | the operation was canceled via calls to abort() or close() before it was finished.

That doesn't help much if we don't know why it was aborted or closed. So that one needs more tlc. But 2 at least is obvious.

I would alter the message at least to say...

Network error: 2: see https://doc.qt.io/qt-6/qnetworkreply.html#NetworkError-enum for what it means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants