mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
don't reauthenticate on HTTP 400 errors
since these are likely unrelated to authentication issues, but rather have to do with generic API errors or outages
This commit is contained in:
@@ -163,14 +163,14 @@ describe('iD.serviceOsm', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('retries an authenticated call unauthenticated if 400 Bad Request', function (done) {
|
||||
it('retries an authenticated call unauthenticated if 401 Unauthorized', function (done) {
|
||||
fetchMock.mock('https://www.openstreetmap.org' + path, {
|
||||
body: response,
|
||||
status: 200,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
serverXHR.respondWith('GET', 'https://www.openstreetmap.org' + path,
|
||||
[400, { 'Content-Type': 'text/plain' }, 'Bad Request']);
|
||||
[401, { 'Content-Type': 'text/plain' }, 'Unauthorized']);
|
||||
|
||||
login();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user