Commit bc3a0f6d authored by Thea Schöbl's avatar Thea Schöbl
Browse files

feat: add model for requestBodyTooLargeError

parent a09aae5d
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -101,6 +101,19 @@ export class SCMethodNotAllowedErrorResponse extends SCError {
  }
}

/**
 * An error that is returned, when the request body is too large.
 */
export class SCRequestBodyTooLargeErrorResponse extends SCError {
  /**
   * Create a SCRequestBodyTooLargeErrorResponse
   * @param stack Set to true if a stack trace should be created
   */
  constructor(stack?: boolean) {
    super('RequestBodyTooLargeError', 'The request body is too large.', 413, stack);
  }
}

/**
 * An error that is returned, when to many request are submitted at once
 */
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../../../Route';
import {
  SCInternalServerErrorResponse,
  SCMethodNotAllowedErrorResponse,
  SCRequestBodyTooLargeErrorResponse,
  SCSyntaxErrorResponse,
  SCUnsupportedMediaTypeErrorResponse,
  SCValidationErrorResponse,
@@ -38,6 +39,7 @@ export class SCIndexRoute extends SCAbstractRoute {
    this.errorNames = [
      SCInternalServerErrorResponse,
      SCMethodNotAllowedErrorResponse,
      SCRequestBodyTooLargeErrorResponse,
      SCSyntaxErrorResponse,
      SCUnsupportedMediaTypeErrorResponse,
      SCValidationErrorResponse,
+4 −1
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../../../../Route';
import {
  SCInternalServerErrorResponse,
  SCMethodNotAllowedErrorResponse,
  SCNotFoundErrorResponse, SCSyntaxErrorResponse,
  SCNotFoundErrorResponse,
  SCRequestBodyTooLargeErrorResponse,
  SCSyntaxErrorResponse,
  SCUnsupportedMediaTypeErrorResponse,
  SCValidationErrorResponse,
} from '../../../errors/ErrorResponse';
@@ -39,6 +41,7 @@ export class SCThingUpdateRoute extends SCAbstractRoute {
      SCInternalServerErrorResponse,
      SCMethodNotAllowedErrorResponse,
      SCNotFoundErrorResponse,
      SCRequestBodyTooLargeErrorResponse,
      SCSyntaxErrorResponse,
      SCUnsupportedMediaTypeErrorResponse,
      SCValidationErrorResponse,
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ import {
  SCInternalServerErrorResponse,
  SCMethodNotAllowedErrorResponse,
  SCNotFoundErrorResponse,
  SCRequestBodyTooLargeErrorResponse,
  SCSyntaxErrorResponse,
  SCUnsupportedMediaTypeErrorResponse,
  SCValidationErrorResponse,
@@ -71,6 +72,7 @@ export class SCBookAvailabilityRoute extends SCAbstractRoute {
      SCInternalServerErrorResponse,
      SCMethodNotAllowedErrorResponse,
      SCNotFoundErrorResponse,
      SCRequestBodyTooLargeErrorResponse,
      SCSyntaxErrorResponse,
      SCUnsupportedMediaTypeErrorResponse,
      SCValidationErrorResponse,
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ import {SCISO8601Date} from '../../../types/Time';
import {
  SCInternalServerErrorResponse,
  SCMethodNotAllowedErrorResponse,
  SCRequestBodyTooLargeErrorResponse,
  SCSyntaxErrorResponse,
  SCUnsupportedMediaTypeErrorResponse,
  SCValidationErrorResponse,
@@ -69,6 +70,7 @@ export class SCBulkRoute extends SCAbstractRoute {
    this.errorNames = [
      SCInternalServerErrorResponse,
      SCMethodNotAllowedErrorResponse,
      SCRequestBodyTooLargeErrorResponse,
      SCSyntaxErrorResponse,
      SCUnsupportedMediaTypeErrorResponse,
      SCValidationErrorResponse,
Loading