Skip to content

Commit

Permalink
refactor(cli): type error as any
Browse files Browse the repository at this point in the history
  • Loading branch information
Iru89 committed Aug 8, 2024
1 parent 414c483 commit 9a234c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/botonic-cli/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Deploying to AWS...
try {
await this.botonicApiService.login(email, password)
await this.deployBotFlow()

Check warning on line 207 in packages/botonic-cli/src/commands/deploy.ts

View check run for this annotation

Codecov / codecov/patch

packages/botonic-cli/src/commands/deploy.ts#L205-L207

Added lines #L205 - L207 were not covered by tests
} catch (err) {
} catch (err: any) {
const axiosError = err as AxiosError<LoginErrorData>

Check warning on line 209 in packages/botonic-cli/src/commands/deploy.ts

View check run for this annotation

Codecov / codecov/patch

packages/botonic-cli/src/commands/deploy.ts#L209

Added line #L209 was not covered by tests
if (axiosError.response?.data?.error_description) {
console.log(colors.red(axiosError.response.data.error_description))

Check warning on line 211 in packages/botonic-cli/src/commands/deploy.ts

View check run for this annotation

Codecov / codecov/patch

packages/botonic-cli/src/commands/deploy.ts#L211

Added line #L211 was not covered by tests
Expand All @@ -231,7 +231,7 @@ Deploying to AWS...
try {
await this.botonicApiService.signup(email, password, orgName, campaign)
await this.login(email, password)

Check warning on line 233 in packages/botonic-cli/src/commands/deploy.ts

View check run for this annotation

Codecov / codecov/patch

packages/botonic-cli/src/commands/deploy.ts#L231-L233

Added lines #L231 - L233 were not covered by tests
} catch (err) {
} catch (err: any) {
if (err.response?.data?.email) {
console.log(colors.red(err.response.data.email[0]))

Check warning on line 236 in packages/botonic-cli/src/commands/deploy.ts

View check run for this annotation

Codecov / codecov/patch

packages/botonic-cli/src/commands/deploy.ts#L236

Added line #L236 was not covered by tests
}
Expand Down Expand Up @@ -287,7 +287,7 @@ Deploying to AWS...
try {
await this.botonicApiService.saveBot(inpBotName)
this.deploy()

Check warning on line 289 in packages/botonic-cli/src/commands/deploy.ts

View check run for this annotation

Codecov / codecov/patch

packages/botonic-cli/src/commands/deploy.ts#L287-L289

Added lines #L287 - L289 were not covered by tests
} catch (err) {
} catch (err: any) {
console.log(

Check warning on line 291 in packages/botonic-cli/src/commands/deploy.ts

View check run for this annotation

Codecov / codecov/patch

packages/botonic-cli/src/commands/deploy.ts#L291

Added line #L291 was not covered by tests
colors.red(`There was an error saving the bot: ${String(err)}`)
)
Expand Down Expand Up @@ -400,7 +400,7 @@ Deploying to AWS...
} else throw deployStatus.data.error
}
}
} catch (err) {
} catch (err: any) {
spinner.fail()
const error = String(err)
console.log(colors.red('There was a problem in the deploy:'))
Expand Down

0 comments on commit 9a234c5

Please sign in to comment.