Skip to content

Commit

Permalink
Attempting to appease tsc 🤞
Browse files Browse the repository at this point in the history
  • Loading branch information
meatballhat committed Jan 25, 2024
1 parent 0cdb006 commit 0b046b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions src/APIClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
import axios, { AxiosInstance, AxiosResponse } from 'axios'
import AxiosCookieJarSupport from 'axios-cookiejar-support'
import { CookieJar } from 'tough-cookie'
import fs from 'fs'
Expand All @@ -22,7 +22,6 @@ import { Version } from './Version'
export interface APIClientConfiguration {
baseURL: string
apiKey: string
axiosConfig?: AxiosRequestConfig
}

export class APIClient {
Expand Down Expand Up @@ -55,10 +54,6 @@ export class APIClient {
withCredentials: true
}

if (cfg.axiosConfig !== undefined && cfg.axiosConfig !== null) {
clientCfg = { ...clientCfg, ...cfg.axiosConfig }
}

debugLog(() => [
'APIClient: building axios client with',
`config=${JSON.stringify(clientCfg)}`
Expand All @@ -70,7 +65,7 @@ export class APIClient {
this.client.defaults.jar = new CookieJar()

if (debugEnabled) {
this.client.interceptors.request.use((r: AxiosRequestConfig): AxiosRequestConfig => {
this.client.interceptors.request.use((r) => {
debugLog(() => [
'APIClient: request',
r.method?.toUpperCase(),
Expand All @@ -81,7 +76,7 @@ export class APIClient {
return r
})

this.client.interceptors.response.use((r: AxiosResponse): AxiosResponse => {
this.client.interceptors.response.use((r) => {
debugLog(() => [
'APIClient: response',
`status=${r.status}`,
Expand Down
2 changes: 1 addition & 1 deletion src/Deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export class Deployer {
throw err
}

const errCode = err.response?.data?.code
const errCode = (err.response?.data as any).code || null
if (errCode !== APIErrorDuplicateName) {
debugLog(() => [
'Deployer: received an unexpected conflict error during app',
Expand Down

0 comments on commit 0b046b1

Please sign in to comment.