Skip to content

Commit

Permalink
Fix for updated got module (#35)
Browse files Browse the repository at this point in the history
* use await import to import the `got` module
* bump `got` module to latest version
* removed `UnsupportedProtocolError` as it can no longer be used
* changed syntax to import/use `got` module
* renamed `GotError` to `RequestError`
  • Loading branch information
EuleHaken authored Oct 5, 2022
1 parent fb1852e commit 09b53f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ class Command extends require("./template.js") {
statusMessage
};
}
else if (e instanceof sb.Got.GotError) {
else if (e instanceof sb.Got.RequestError) {
origin = "External";
const { code, name, message, options } = e;
errorContext = {
Expand Down Expand Up @@ -740,7 +740,7 @@ class Command extends require("./template.js") {
reply: `🚨 Third party ${hostname} failed! ${message ?? "(no message)"} (error ID ${errorID})`
};
}
else if (e instanceof sb.Got.GotError) {
else if (e instanceof sb.Got.RequestError) {
execution = {
success: false,
reason: "got-error",
Expand Down

0 comments on commit 09b53f5

Please sign in to comment.