UNPKG

874 BJavaScriptView Raw
1/**
2 * @file Defines the ResponseValidationError class.
3 */
4
5"use strict";
6
7const ValidationError = require( "@corefw/common" )
8 .errors.abstract.ValidationError;
9
10/**
11 * This error is thrown whenever a response object fails validation.
12 *
13 * @abstract
14 * @memberOf Errors
15 * @extends Errors.Abstract.ValidationError
16 */
17class ResponseValidationError extends ValidationError {
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 = ResponseValidationError;
34