Clean code
This commit is contained in:
parent
2cbf7a47c1
commit
2b90d972b2
|
@ -68,7 +68,7 @@ export const createAPIClient = (config: APIClientConfig = {}): APIClient => {
|
|||
): Promise<APIError> => {
|
||||
// Try to read a message from the error
|
||||
let message = response.statusText
|
||||
let json: any = null
|
||||
let json = null
|
||||
try {
|
||||
json = await response.json()
|
||||
if (json?.message) {
|
||||
|
|
Loading…
Reference in New Issue