Skip to content

Commit dd2e7a8

Browse files
authored
Change status code for script not found (#1735)
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
1 parent ff1e6cf commit dd2e7a8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

controllers/scriptStorage.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1881,9 +1881,8 @@ exports.storeScript = function (aUser, aMeta, aBuf, aUpdate, aCallback) {
18811881
return;
18821882
} else if (!aScript && aUpdate) {
18831883
aCallback(new statusError({
1884-
message: 'Updating but no script found. Reference: '
1885-
+ installName + ' ; '+ caseSensitive(installName),
1886-
code: 500 // Status code unknown... could be user error too
1884+
message: 'Updating but no script found.',
1885+
code: 404
18871886
}), null);
18881887
return;
18891888
} else if (!aScript) {

0 commit comments

Comments
 (0)