errors.js — fastify Source File
Architecture documentation for errors.js, a javascript file in the fastify codebase.
Entity Profile
Relationship Graph
Source Code
'use strict'
const createError = require('@fastify/error')
const codes = {
/**
* Basic
*/
FST_ERR_NOT_FOUND: createError(
'FST_ERR_NOT_FOUND',
'Not Found',
404
),
FST_ERR_OPTIONS_NOT_OBJ: createError(
'FST_ERR_OPTIONS_NOT_OBJ',
'Options must be an object',
500,
TypeError
),
FST_ERR_QSP_NOT_FN: createError(
'FST_ERR_QSP_NOT_FN',
"querystringParser option should be a function, instead got '%s'",
500,
TypeError
),
FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN: createError(
'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN',
"schemaController.bucket option should be a function, instead got '%s'",
500,
TypeError
),
FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN: createError(
'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN',
"schemaErrorFormatter option should be a non async function. Instead got '%s'.",
500,
TypeError
),
FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ: createError(
'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ',
"ajv.customOptions option should be an object, instead got '%s'",
500,
TypeError
),
FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR: createError(
'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR',
"ajv.plugins option should be an array, instead got '%s'",
500,
TypeError
),
FST_ERR_VALIDATION: createError(
'FST_ERR_VALIDATION',
'%s',
400
),
FST_ERR_LISTEN_OPTIONS_INVALID: createError(
'FST_ERR_LISTEN_OPTIONS_INVALID',
"Invalid listen options: '%s'",
500,
TypeError
),
// ... (446 more lines)
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does errors.js do?
errors.js is a source file in the fastify codebase, written in javascript. It belongs to the CoreKernel domain, LifecycleManager subdomain.
What functions are defined in errors.js?
errors.js defines 1 function(s): appendStackTrace.
Where is errors.js in the architecture?
errors.js is located at lib/errors.js (domain: CoreKernel, subdomain: LifecycleManager, directory: lib).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free