Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes: #2743 Fix issue where source control always shows loading if auth token is … #3227

Merged
merged 1 commit into from
Sep 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2,678 changes: 1,339 additions & 1,339 deletions client/src/app/shared/models/portal-resources.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export class StepSourceControlComponent {
this.setProviderCardStatus('github', 'authorized', r.json().login);
},
err => {
this.setProviderCardStatus('github', 'notAuthorized');
this._logService.error(LogCategories.cicd, '/fetch-github-user', err);
},
);
Expand All @@ -166,6 +167,7 @@ export class StepSourceControlComponent {
this.setProviderCardStatus('bitbucket', 'authorized', r.json().display_name);
},
err => {
this.setProviderCardStatus('bitbucket', 'notAuthorized');
this._logService.error(LogCategories.cicd, '/fetch-bitbucket-user', err);
},
);
Expand All @@ -189,6 +191,7 @@ export class StepSourceControlComponent {
this.setProviderCardStatus('onedrive', 'authorized', r.json().owner.user.displayName);
},
err => {
this.setProviderCardStatus('onedrive', 'notAuthorized');
this._logService.error(LogCategories.cicd, '/fetch-onedrive-user', err);
},
);
Expand All @@ -211,6 +214,7 @@ export class StepSourceControlComponent {
this.setProviderCardStatus('dropbox', 'authorized', r.json().name.display_name);
},
err => {
this.setProviderCardStatus('dropbox', 'notAuthorized');
this._logService.error(LogCategories.cicd, '/fetch-dropbox-user', err);
},
);
Expand Down
2 changes: 1 addition & 1 deletion server/src/deployment-center/bitbucket-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function setupBitbucketAuthentication(app: Application) {
res.json(response.data);
} catch (err) {
LogHelper.error('bitbucket-passthrough', err);
res.send(err.response); //most likely due to expired creds
res.sendStatus(err.response.status);
}
});

Expand Down
2 changes: 1 addition & 1 deletion server/src/deployment-center/dropbox-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function setupDropboxAuthentication(app: Application) {
res.json(response.data);
} catch (err) {
LogHelper.error('dropbox-passthrough', err);
res.send(err.response);
res.sendStatus(err.response.status);
}
});

Expand Down
2 changes: 1 addition & 1 deletion server/src/deployment-center/github-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function setupGithubAuthentication(app: Application) {
res.json(response.data);
} catch (err) {
LogHelper.error('github-passthrough', err);
res.send(err.response);
res.sendStatus(err.response.status);
}
});

Expand Down
2 changes: 1 addition & 1 deletion server/src/deployment-center/onedrive-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function setupOnedriveAuthentication(app: Application) {
res.json(response.data);
} catch (err) {
LogHelper.error('onedrive-passthrough', err);
res.send(err.response);
res.sendStatus(err.response.status);
}
});

Expand Down