Modify SessionReader to explicitly catch MissingParameterException and respond with ErrorResponse to request #229

Merged
lars.winzer merged 2 commits from fix/46-sessionreader-catch-missingparameterexception into main 2026-04-02 13:48:27 +02:00
Showing only changes of commit 528a40b394 - Show all commits
@@ -96,8 +96,12 @@ public class SessionReader implements Runnable {
e); e);
} catch (MissingParameterException e) { } catch (MissingParameterException e) {
logger.error("Recieved request for command '{}' was missing the '{}' parameter", rawRequest.command(), e.getParameterKey()); logger.error(
sendErrorResponse(new ErrorResponse(requestContext, "MISSING_PARAMETER", e.getMessage())); "Recieved request for command '{}' was missing the '{}' parameter",
rawRequest.command(),
e.getParameterKey());
sendErrorResponse(
new ErrorResponse(requestContext, "MISSING_PARAMETER", e.getMessage()));
} catch (IOException e) { } catch (IOException e) {
logger.error("Unexpected IO exception while reading from transport", e); logger.error("Unexpected IO exception while reading from transport", e);