Skip to content

Commit

Permalink
Minor fixes in workspace start routine
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Morhun <[email protected]>
  • Loading branch information
mmorhun committed Mar 25, 2020
1 parent ad89388 commit e84bb9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/che.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ export class CheHelper {
let response

const headers: {[key: string]: string} = {}
if (accessToken && accessToken.length > 0) {
if (accessToken) {
headers.Authorization = accessToken
}
try {
response = await this.axios.post(endpoint, undefined, { headers })
} catch (error) {
if (error.response && error.response.status === 404) {
throw new Error('E_WORKSPACE_NOT_EXIST')
throw new Error(`E_WORKSPACE_NOT_EXIST - workspace with "${workspaceId}" id doesn't exist`)
} else {
throw this.getCheApiError(error, endpoint)
}
Expand Down

0 comments on commit e84bb9d

Please sign in to comment.