UNPKG

954 BJavaScriptView Raw
1/**
2 * @file Defines the MissingRequestBodySchemaError class.
3 */
4
5"use strict";
6
7const MissingSchemaError = require( "@corefw/common" )
8 .errors.abstract.MissingSchemaError;
9
10/**
11 * This error is thrown whenever a schema object/document is expected in order
12 * to validate a request's body, but cannot be found.
13 *
14 * @memberOf Errors
15 * @extends Errors.Abstract.MissingSchemaError
16 */
17class MissingRequestBodySchemaError extends MissingSchemaError {
18
19 /**
20 * @param {Error} [cause] - An optional Error object that can be provided if
21 * this error was caused by another.
22 * @param {string} message - An error message that provides clients with a
23 * description of the error condition and, potentially, how it might be
24 * resolved.
25 * @param {...*} [args] - Printf style arguments for the message.
26 */
27 constructor( cause, message, ...args ) {
28
29 super( cause, message, ...args );
30 }
31}
32
33module.exports = MissingRequestBodySchemaError;