Wrap some long lines

This commit is contained in:
lilia 2014-11-06 18:13:54 -08:00
parent 0a3c03025b
commit 74bfc9d04e

View file

@ -93,20 +93,27 @@ window.textsecure.api = function() {
try { try {
switch (code) { switch (code) {
case -1: case -1:
textsecure.throwHumanError(code, "HTTPError", "Failed to connect to the server, please check your network connection."); textsecure.throwHumanError(code, "HTTPError",
"Failed to connect to the server, please check your network connection.");
case 413: case 413:
textsecure.throwHumanError(code, "HTTPError", "Rate limit exceeded, please try again later."); textsecure.throwHumanError(code, "HTTPError",
"Rate limit exceeded, please try again later.");
case 403: case 403:
textsecure.throwHumanError(code, "HTTPError", "Invalid code, please try again."); textsecure.throwHumanError(code, "HTTPError",
"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", "Number already registered."); textsecure.throwHumanError(code, "HTTPError",
"Number already registered.");
case 401: case 401:
textsecure.throwHumanError(code, "HTTPError", "Invalid authentication, most likely someone re-registered and invalidated our registration."); textsecure.throwHumanError(code, "HTTPError",
"Invalid authentication, most likely someone re-registered and invalidated our registration.");
case 404: case 404:
textsecure.throwHumanError(code, "HTTPError", "Number is not registered with TextSecure."); textsecure.throwHumanError(code, "HTTPError",
"Number is not registered with TextSecure.");
default: default:
textsecure.throwHumanError(code, "HTTPError", "The server rejected our query, please file a bug report."); textsecure.throwHumanError(code, "HTTPError",
"The server rejected our query, please file a bug report.");
} }
} catch (e) { } catch (e) {
if (jqXHR.responseJSON) if (jqXHR.responseJSON)