diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index dcf9580b6..1323633f2 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -387,7 +387,7 @@ void TorrentsController::infoAction() if (offset < 0) offset = size + offset; if ((offset >= size) || (offset < 0)) - offset = 0; + throw APIError(APIErrorType::Conflict, tr("Offset is out of range")); // normalize limit if (limit <= 0) limit = -1; // unlimited