mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 03:32:52 +00:00
refactor: make resonse error types validatable
This commit is contained in:
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned, when an internal server error occurred
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCInternalServerErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned, when the used HTTP method is not allowed on the requested route
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCMethodNotAllowedErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned when the requested route or resource was not found
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCNotFoundErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,8 @@ import {SCError} from '../error';
|
||||
/**
|
||||
* An error that is returned when the request is in the right format, but contains parameters that are invalid or not
|
||||
* acceptable.
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCParametersNotAcceptable extends SCError {
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,8 @@ import {SCPluginMetaData} from '../routes/plugin-register';
|
||||
* An error that is returned when a plugin with the same name is already registered, to prevent two copies of a plugin
|
||||
* running at the same time.
|
||||
* This usually indicates that there is more than one instance a plugin running.
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCPluginAlreadyRegisteredErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned whenever there is an unexpected error while creating a plugin
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCPluginRegisteringFailedErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned, when the request body is too large.
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCRequestBodyTooLargeErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned whenever there is a syntax error
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCSyntaxErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned, when to many request are submitted at once
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCTooManyRequestsErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned when the content type of the request is not supported
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCUnsupportedMediaTypeErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,8 @@ import {SCError} from '../error';
|
||||
|
||||
/**
|
||||
* An error that is returned when the validation of a request fails
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export class SCValidationErrorResponse extends SCError {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user