Fix access denial messages

Updated error messages for access denial from (401) to (403) for remote content.
Added (401) status code to authentication error messages.

PR #22774.
This commit is contained in:
Zentino 2025-05-27 14:47:43 +08:00 committed by GitHub
commit 7648a2838d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -279,13 +279,13 @@ QString Net::DownloadHandlerImpl::errorCodeToString(const QNetworkReply::Network
case QNetworkReply::ProxyAuthenticationRequiredError:
return tr("The proxy requires authentication in order to honor the request but did not accept any credentials offered");
case QNetworkReply::ContentAccessDenied:
return tr("The access to the remote content was denied (401)");
return tr("The access to the remote content was denied (403)");
case QNetworkReply::ContentOperationNotPermittedError:
return tr("The operation requested on the remote content is not permitted");
case QNetworkReply::ContentNotFoundError:
return tr("The remote content was not found at the server (404)");
case QNetworkReply::AuthenticationRequiredError:
return tr("The remote server requires authentication to serve the content but the credentials provided were not accepted");
return tr("The remote server requires authentication to serve the content but the credentials provided were not accepted (401)");
case QNetworkReply::ProtocolUnknownError:
return tr("The Network Access API cannot honor the request because the protocol is not known");
case QNetworkReply::ProtocolInvalidOperationError: