mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
Hello airbnb
This commit is contained in:
1 parent
f9468536de
commit
8c195661d7
78 files changed
+2032
-1471
No files matched your search
+29
-15
@@ -2,7 +2,7 @@ class UserFacingError extends Error {
|
||||
constructor(type) {
|
||||
super(type);
|
||||
this.code = 500;
|
||||
//this.stack = '';
|
||||
// this.stack = '';
|
||||
this.params = [];
|
||||
}
|
||||
}
|
||||
@@ -75,9 +75,9 @@ class VerifyPasswordError extends ForbiddenError {
|
||||
}
|
||||
}
|
||||
class OpcountExceededError extends ForbiddenError {
|
||||
constructor(op, period_secs, max_operations) {
|
||||
constructor(op, periodSecs, maxOperations) {
|
||||
super('OpcountExceededError');
|
||||
this.params = [op, period_secs, max_operations];
|
||||
this.params = [op, periodSecs, maxOperations];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,15 +155,31 @@ class ProblemDataNotFoundError extends NotFoundError {
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
BadRequestError, ForbiddenError, NotFoundError,
|
||||
LoginError, UserAlreadyExistError, InvalidTokenError,
|
||||
UserNotFoundError, VerifyPasswordError, ProblemDataNotFoundError,
|
||||
OpcountExceededError, PermissionError, NoProblemError,
|
||||
ValidationError, ProblemNotFoundError, TrainingNotFoundError,
|
||||
ContestNotFoundError, RecordNotFoundError, SolutionNotFoundError,
|
||||
AlreadyVotedError, ContestNotAttendedError, ContestNotLiveError,
|
||||
ContestScoreboardHiddenError, ContestAlreadyAttendedError, UserFacingError,
|
||||
SystemError
|
||||
BadRequestError,
|
||||
ForbiddenError,
|
||||
NotFoundError,
|
||||
LoginError,
|
||||
UserAlreadyExistError,
|
||||
InvalidTokenError,
|
||||
UserNotFoundError,
|
||||
VerifyPasswordError,
|
||||
ProblemDataNotFoundError,
|
||||
OpcountExceededError,
|
||||
PermissionError,
|
||||
NoProblemError,
|
||||
ValidationError,
|
||||
ProblemNotFoundError,
|
||||
TrainingNotFoundError,
|
||||
ContestNotFoundError,
|
||||
RecordNotFoundError,
|
||||
SolutionNotFoundError,
|
||||
AlreadyVotedError,
|
||||
ContestNotAttendedError,
|
||||
ContestNotLiveError,
|
||||
ContestScoreboardHiddenError,
|
||||
ContestAlreadyAttendedError,
|
||||
UserFacingError,
|
||||
SystemError,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -201,7 +217,6 @@ class UserFacingError(Error):
|
||||
return 'An error has occurred.'
|
||||
|
||||
|
||||
|
||||
class BlacklistedError(ForbiddenError):
|
||||
@property
|
||||
def message(self):
|
||||
@@ -240,7 +255,6 @@ class InvalidOperationError(ForbiddenError):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
class InvalidTokenDigestError(ForbiddenError):
|
||||
pass
|
||||
|
||||
@@ -374,4 +388,4 @@ class SendMailError(UserFacingError):
|
||||
@property
|
||||
def message(self):
|
||||
return 'Failed to send mail to {0}.'
|
||||
*/
|
||||
*/
|
||||
Reference in new issue
Block a user