WebAPI: Respond with more detailed info

* WebAPI: return error message when endpoint not found
* WebAPI: send appropriate status code when logging in
* WebAPI: return more info when adding torrents

PR #23202.
Closes #375.
Closes #10688.
Closes #10747.
Closes #11464.
This commit is contained in:
Thomas (Tom) Piccirello
2025-09-12 07:53:48 -07:00
committed by GitHub
parent 69b2d7a53e
commit 7ddbf58a3b
8 changed files with 76 additions and 17 deletions

View File

@@ -418,6 +418,8 @@ void WebApplication::doProcessRequest()
throw ConflictHTTPError(error.message());
case APIErrorType::NotFound:
throw NotFoundHTTPError(error.message());
case APIErrorType::Unauthorized:
throw UnauthorizedHTTPError(error.message());
default:
Q_UNREACHABLE();
break;