Class V2JsonRequestParams.InvalidOffsetException

All Implemented Interfaces:
Serializable
Enclosing class:
V2JsonRequestParams

public static class V2JsonRequestParams.InvalidOffsetException extends V2JsonRequestParams.InvalidPageSizeException
Thrown by V2JsonRequestParams.getOffset() or V2JsonRequestParams.getStartPosition() when the offset / start parameter is present but negative. Negative paging positions are not meaningful and previously collided with the -1 "uninitialised" sentinel — handlers should catch this and map it to V2ErrorCode.INVALID_REQUEST.

Extends V2JsonRequestParams.InvalidPageSizeException so existing handler catch blocks that already map invalid paging input to INVALID_REQUEST also cover the offset variant without per-handler edits. Test code that asserts specifically on V2JsonRequestParams.InvalidOffsetException keeps working because instanceof InvalidOffsetException narrows beyond the parent type.

See Also:
  • Constructor Details

    • InvalidOffsetException

      public InvalidOffsetException(String message)
      Creates the exception with a diagnostic message.
      Parameters:
      message - human-readable description of the invalid offset