MCPcopy Index your code
hub / github.com/bugy/script-server / onError

Function onError

web-src/src/login/login.js:205–218  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

203 };
204
205 const onError = function (error) {
206 const status = get(error, 'response.status');
207
208 const loginButton = getLoginButton();
209 loginButton.removeAttribute('disabled');
210
211 if (contains([400, 401, 403, 500], status)) {
212 showError(error.response.data);
213
214 } else {
215 showError('Unknown error occurred. Please contact the administrator');
216 logError(error)
217 }
218 };
219
220 showInfo('Verifying credentials...');
221

Callers 1

callHttpFunction · 0.85

Calls 4

containsFunction · 0.90
logErrorFunction · 0.90
getLoginButtonFunction · 0.85
showErrorFunction · 0.85

Tested by

no test coverage detected