Skip to content

Commit

Permalink
Change status code for script not found (#1735)
Browse files Browse the repository at this point in the history
Instances:
1. Author has webhook enabled and GH sends update notice before imported on OUJS.
2. Author deleted OUJS script and still receiving webhook notice.

There's still the extremely rare chance that this could be a 500, if *mongoose*,*mongodb*, and S3 has a catastrophic connection error.

Since the bulk of this is usually client error denoting as such in case GH is paying attention and possibly doing something on their end by killing further notices. If true then this part "could be" related to #1730

Post #1731

Auto-merge
  • Loading branch information
Martii authored Aug 17, 2020
1 parent ff1e6cf commit dd2e7a8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions controllers/scriptStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -1881,9 +1881,8 @@ exports.storeScript = function (aUser, aMeta, aBuf, aUpdate, aCallback) {
return;
} else if (!aScript && aUpdate) {
aCallback(new statusError({
message: 'Updating but no script found. Reference: '
+ installName + ' ; '+ caseSensitive(installName),
code: 500 // Status code unknown... could be user error too
message: 'Updating but no script found.',
code: 404
}), null);
return;
} else if (!aScript) {
Expand Down

0 comments on commit dd2e7a8

Please sign in to comment.