Logo
Explore Help
Register Sign In
Tools/Notes
1
0
Fork 0
You've already forked Notes
mirror of https://github.com/TriliumNext/Notes.git synced 2025-08-01 20:52:27 +08:00
Code Issues Packages Projects Releases Wiki Activity
Notes/src/errors/validation_error.ts

12 lines
232 B
TypeScript
Raw Normal View History

refactor(errors): extend errors from Error and add/assign statusCode this is in preparation for updating the routes/handleException method, to get rid of "any" (and improve in general)
2025-03-07 22:22:44 +01:00
class ValidationError extends Error {
statusCode: number;
server-ts: errors/*.js -> .ts
2024-02-16 22:50:49 +02:00
constructor(message: string) {
refactor(errors): extend errors from Error and add/assign statusCode this is in preparation for updating the routes/handleException method, to get rid of "any" (and improve in general)
2025-03-07 22:22:44 +01:00
super(message)
this.name = "ValidationError";
this.statusCode = 400;
introduced new exception classes for structured error reporting
2022-12-09 16:04:13 +01:00
}
refactor(errors): extend errors from Error and add/assign statusCode this is in preparation for updating the routes/handleException method, to get rid of "any" (and improve in general)
2025-03-07 22:22:44 +01:00
introduced new exception classes for structured error reporting
2022-12-09 16:04:13 +01:00
}
chore(code): fix more js & ts files
2024-12-22 15:45:54 +02:00
export default ValidationError;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 23.8.2 Page: 156ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API