Fix api.js

This commit is contained in:
lilia 2015-05-04 14:54:09 -07:00
parent e4b49bde51
commit 2ff954d2f8
3 changed files with 21 additions and 21 deletions

View file

@ -39156,26 +39156,26 @@ window.textsecure.api = function () {
try { try {
switch (code) { switch (code) {
case -1: case -1:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Failed to connect to the server, please check your network connection."); "Failed to connect to the server, please check your network connection.");
case 413: case 413:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Rate limit exceeded, please try again later."); "Rate limit exceeded, please try again later.");
case 403: case 403:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Invalid code, please try again."); "Invalid code, please try again.");
case 417: case 417:
// TODO: This shouldn't be a thing?, but its in the API doc? // TODO: This shouldn't be a thing?, but its in the API doc?
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Number already registered."); "Number already registered.");
case 401: case 401:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Invalid authentication, most likely someone re-registered and invalidated our registration."); "Invalid authentication, most likely someone re-registered and invalidated our registration.");
case 404: case 404:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Number is not registered with TextSecure."); "Number is not registered with TextSecure.");
default: default:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"The server rejected our query, please file a bug report."); "The server rejected our query, please file a bug report.");
} }
} catch (e) { } catch (e) {

View file

@ -39155,26 +39155,26 @@ window.textsecure.api = function () {
try { try {
switch (code) { switch (code) {
case -1: case -1:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Failed to connect to the server, please check your network connection."); "Failed to connect to the server, please check your network connection.");
case 413: case 413:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Rate limit exceeded, please try again later."); "Rate limit exceeded, please try again later.");
case 403: case 403:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Invalid code, please try again."); "Invalid code, please try again.");
case 417: case 417:
// TODO: This shouldn't be a thing?, but its in the API doc? // TODO: This shouldn't be a thing?, but its in the API doc?
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Number already registered."); "Number already registered.");
case 401: case 401:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Invalid authentication, most likely someone re-registered and invalidated our registration."); "Invalid authentication, most likely someone re-registered and invalidated our registration.");
case 404: case 404:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Number is not registered with TextSecure."); "Number is not registered with TextSecure.");
default: default:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"The server rejected our query, please file a bug report."); "The server rejected our query, please file a bug report.");
} }
} catch (e) { } catch (e) {

View file

@ -128,26 +128,26 @@ window.textsecure.api = function () {
try { try {
switch (code) { switch (code) {
case -1: case -1:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Failed to connect to the server, please check your network connection."); "Failed to connect to the server, please check your network connection.");
case 413: case 413:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Rate limit exceeded, please try again later."); "Rate limit exceeded, please try again later.");
case 403: case 403:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Invalid code, please try again."); "Invalid code, please try again.");
case 417: case 417:
// TODO: This shouldn't be a thing?, but its in the API doc? // TODO: This shouldn't be a thing?, but its in the API doc?
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Number already registered."); "Number already registered.");
case 401: case 401:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Invalid authentication, most likely someone re-registered and invalidated our registration."); "Invalid authentication, most likely someone re-registered and invalidated our registration.");
case 404: case 404:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"Number is not registered with TextSecure."); "Number is not registered with TextSecure.");
default: default:
textsecure.throwHumanError(code, "HTTPError", throwHumanError(code, "HTTPError",
"The server rejected our query, please file a bug report."); "The server rejected our query, please file a bug report.");
} }
} catch (e) { } catch (e) {