Skip to content

Commit

Permalink
added handlind of status 400 [see #6]
Browse files Browse the repository at this point in the history
  • Loading branch information
binfalse committed Nov 24, 2017
1 parent acf6efd commit 2562584
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions webextension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ function YOURLS(settings, options, expected) {
err.supp.links.push ("extension's settings");
break;

case 400:
err.supp.text = "Is that a proper URL? YOURLS won't shorten URLs such as 'about:addons' etc. If you think this is an error please report the issue at https://github.com/binfalse/YOURLS-FirefoxExtension/issues and explain what you did.";
err.supp.links.push ("https://github.com/binfalse/YOURLS-FirefoxExtension/issues");
break;

case 0:
err.supp.text = "Experienced a general connection issue... Maybe your SSL certificate is not valid? Your server is down? You provided an illegal Server URL? Please verify your extension's settings and make sure that you can access the admin interface at " + apiURLwSlash + "admin. If you need further help open a new ticket at https://github.com/binfalse/YOURLS-FirefoxExtension/issues and explain what you did.";
err.supp.links.push (apiURLwSlash + "admin");
Expand Down
2 changes: 1 addition & 1 deletion webextension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "YOURLS WebExtension",
"version": "2.3.2",
"version": "2.3.3",
"description": "Shorten URLs with your own YOURLS instance",
"homepage_url": "https://s.binfalse.de/2f",
"applications": {
Expand Down

0 comments on commit 2562584

Please sign in to comment.