src/main/js/servlet/common/status.js
import { StatusCodes } from 'http-status-codes'
const {
OK,
NO_CONTENT,
BAD_REQUEST,
UNAUTHORIZED,
FORBIDDEN,
NOT_FOUND,
INTERNAL_SERVER_ERROR,
SERVICE_UNAVAILABLE
} = StatusCodes
// NOTE Cloudflare's reverse proxy codes
export const REMOTE_UNKNOWN = 520
export const REMOTE_IS_DOWN = 521
export {
OK,
NO_CONTENT,
BAD_REQUEST,
UNAUTHORIZED,
FORBIDDEN,
NOT_FOUND,
INTERNAL_SERVER_ERROR,
SERVICE_UNAVAILABLE
}
export default {
OK,
NO_CONTENT,
BAD_REQUEST,
UNAUTHORIZED,
FORBIDDEN,
NOT_FOUND,
INTERNAL_SERVER_ERROR,
SERVICE_UNAVAILABLE,
REMOTE_IS_DOWN,
REMOTE_UNKNOWN
}