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-07-31 20:22:27 +08:00
Code Issues Packages Projects Releases Wiki Activity
Notes/src/errors/validation_error.ts

13 lines
229 B
TypeScript
Raw Normal View History

refactor(errors): add HttpError class and extend existing errors from it
2025-03-07 22:47:03 +01:00
import HttpError from "./http_error.js";
class ValidationError extends HttpError {
server-ts: errors/*.js -> .ts
2024-02-16 22:50:49 +02:00
constructor(message: string) {
refactor(errors): add HttpError class and extend existing errors from it
2025-03-07 22:47:03 +01:00
super(message, 400)
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
this.name = "ValidationError";
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: 215ms Template: 4ms
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