Skip to content

Commit

Permalink
Better error notices
Browse files Browse the repository at this point in the history
  • Loading branch information
SaalikLok committed Mar 29, 2024
1 parent 06d53f9 commit 43d6f7e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ export default class LavadocsPlugin extends Plugin {
new Notice("Unauthorized, the gates are closed! Check your Lava Key in the settings.");
return;
}

if (error.status === 404) {
new Notice("Instance of Lavadocs not found. Check the URL in the settings.");
return;
}

if (error.message === "net::ERR_SSL_PROTOCOL_ERROR") {
new Notice("SSL protocol error. Check that your Lavadocs instance is serving on https, or change your URL to regular http.");
return;
}

new Notice(`Error pushing to Lavadocs: ${error.message}`);
console.error(error);
Expand Down

0 comments on commit 43d6f7e

Please sign in to comment.