Skip to content

Commit

Permalink
handle APIError
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed Jun 30, 2017
1 parent eeceeac commit 0dd758e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ export class API {

return await parsedResponse<IAPIRepository>(response)
} catch (e) {
if (e instanceof APIError) {
throw e
}

log.error(`createRepository: failed with endpoint ${this.endpoint}`, e)
throw new Error(
`Unable to publish repository. Please check if you have an internet connection and try again.`
Expand Down

0 comments on commit 0dd758e

Please sign in to comment.