mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-04-30 17:17:59 +02:00
Standardize error responses with consistent format and human-readable messages (#667)
This commit is contained in:
@@ -114,7 +114,7 @@ export default class PullRequest {
|
||||
this.status == "removing" ||
|
||||
this.status == "removed"
|
||||
) {
|
||||
throw new AnonymousError("pullRequest_expired", {
|
||||
throw new AnonymousError("pull_request_expired", {
|
||||
object: this,
|
||||
httpStatus: 410,
|
||||
});
|
||||
@@ -126,8 +126,9 @@ export default class PullRequest {
|
||||
this.status == "preparing" ||
|
||||
(this.status == "download" && this._model.statusDate > fiveMinuteAgo)
|
||||
) {
|
||||
throw new AnonymousError("pullRequest_not_ready", {
|
||||
throw new AnonymousError("pull_request_not_ready", {
|
||||
object: this,
|
||||
httpStatus: 503,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user