Require message field too

This commit is contained in:
Henry Mercer
2025-10-21 10:27:54 +01:00
parent a6b9514fab
commit 40e26468f3
10 changed files with 34 additions and 0 deletions

3
lib/upload-lib.js generated
View File

@@ -88340,6 +88340,9 @@ var ConfigurationError = class extends Error {
}
};
function asHTTPError(arg) {
if (typeof arg !== "object" || arg === null || typeof arg.message !== "string") {
return void 0;
}
if (Number.isInteger(arg.status)) {
return new HTTPError(arg.message, arg.status);
}