Skip to content
Snippets Groups Projects
Commit 66078581 authored by michael.minelli's avatar michael.minelli
Browse files

DojoStatusCode => Add code for refresh token failure

parent d64489e6
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ class GitlabManager { ...@@ -11,6 +11,7 @@ class GitlabManager {
} }
async getTokens(codeOrRefresh: string, isRefresh: boolean = false, clientSecret: string = ''): Promise<GitlabToken> { async getTokens(codeOrRefresh: string, isRefresh: boolean = false, clientSecret: string = ''): Promise<GitlabToken> {
try {
const response = await axios.post<GitlabToken>(SharedConfig.login.gitlab.url.token, { const response = await axios.post<GitlabToken>(SharedConfig.login.gitlab.url.token, {
client_id : SharedConfig.login.gitlab.client.id, client_id : SharedConfig.login.gitlab.client.id,
client_secret: clientSecret, client_secret: clientSecret,
...@@ -21,6 +22,9 @@ class GitlabManager { ...@@ -21,6 +22,9 @@ class GitlabManager {
}); });
return response.data; return response.data;
} catch ( error ) {
throw error;
}
} }
async getRepositoryPipelines(repoId: number, branch: string = 'main'): Promise<Array<GitlabPipeline>> { async getRepositoryPipelines(repoId: number, branch: string = 'main'): Promise<Array<GitlabPipeline>> {
......
enum DojoStatusCode { enum DojoStatusCode {
LOGIN_FAILED = 1, LOGIN_FAILED = 1,
REFRESH_TOKENS_FAILED = 2,
CLIENT_NOT_SUPPORTED = 100, CLIENT_NOT_SUPPORTED = 100,
CLIENT_VERSION_NOT_SUPPORTED = 110, CLIENT_VERSION_NOT_SUPPORTED = 110,
ASSIGNMENT_PUBLISH_NO_PIPELINE = 200, ASSIGNMENT_PUBLISH_NO_PIPELINE = 200,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment