revert accidently pushed commit
Revert "improvement: clear error if Git Gateway settings 404" This reverts commit 424a49e36c92501bad9610fbbe646088d7ab5400.
This commit is contained in:
parent
424a49e36c
commit
ae28f6301e
@ -90,20 +90,7 @@ export default class GitGateway {
|
||||
{
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
},
|
||||
).then(async res => {
|
||||
const contentType = res.headers.get('Content-Type');
|
||||
if (contentType !== 'application/json' && contentType !== 'text/json') {
|
||||
throw new APIError(`Your Git Gateway backend is not returning valid settings. Please make sure it is enabled.`, res.status, 'Git Gateway');
|
||||
}
|
||||
|
||||
const body = await res.json();
|
||||
|
||||
if (!res.ok) {
|
||||
throw new APIError(`Git Gateway Error: ${(body.message ? body.message : body)}`, res.status, 'Git Gateway');
|
||||
}
|
||||
|
||||
return body;
|
||||
});
|
||||
).then(res => res.json());
|
||||
this.acceptRoles = roles;
|
||||
if (github_enabled) {
|
||||
this.backendType = 'github';
|
||||
|
Loading…
x
Reference in New Issue
Block a user