mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: add rate limit for authentication
* improve error handling in frontend
This commit is contained in:
1 parent
203114cd5e
commit
f65b72c5b4
10 files changed
+146
-42
No files matched your search
@@ -0,0 +1,27 @@
|
||||
/* eslint-disable max-classes-per-file */
|
||||
export class TooManyRequestsError extends Error {
|
||||
constructor(message) {
|
||||
super(message)
|
||||
this.name = 'TooManyRequestsError'
|
||||
}
|
||||
}
|
||||
|
||||
export class ValidationError extends Error {
|
||||
constructor(message) {
|
||||
super(message)
|
||||
this.name = 'ValidationError'
|
||||
}
|
||||
}
|
||||
|
||||
export class UnauthorizedError extends Error {
|
||||
constructor(message) {
|
||||
super(message)
|
||||
this.name = 'UnauthorizedError'
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
TooManyRequestsError,
|
||||
ValidationError,
|
||||
UnauthorizedError,
|
||||
}
|
||||
Reference in new issue
Block a user