Skip to content

Commit

Permalink
Merge pull request #5 from SaalikLok/enforce-document-limit
Browse files Browse the repository at this point in the history
Better error when hitting document limit
  • Loading branch information
SaalikLok committed Apr 7, 2024
2 parents 22432d7 + 2cba2ec commit c4664f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { get } from 'http';
import { App, Notice, Plugin, PluginSettingTab, RequestUrlParam, Setting, requestUrl } from 'obsidian';

interface LavadocsPluginSettings {
Expand Down Expand Up @@ -95,6 +94,11 @@ export default class LavadocsPlugin extends Plugin {
return;
}

if (error.status === 403) {
new Notice("Out of documents! Upgrade your account to push more.");
return;
}

if (error.status === 404) {
new Notice("Instance of Lavadocs not found. Check the URL in the settings.");
return;
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "lavadocs",
"name": "Lavadocs",
"version": "1.0.3",
"version": "1.0.4",
"minAppVersion": "0.15.0",
"description": "Public docs, from the fires of your vault.",
"author": "Saalik Lokhandwala",
Expand Down

0 comments on commit c4664f0

Please sign in to comment.