Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosGamero committed Jul 8, 2024
1 parent 85d9e54 commit 707a0cc
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { stringify } from 'fast-querystring'
import type { WretchResponse } from 'wretch'
import {WretchError} from "wretch/resolver";
import { WretchError } from 'wretch/resolver'
import type { z } from 'zod'

import type {
Expand Down Expand Up @@ -117,7 +117,8 @@ async function sendResourceChange<
if (params.isNonJSONResponseExpected === false) {
return Promise.reject(
buildWretchError(
`Request to ${params.path} has returned an unexpected non-JSON response.`, response
`Request to ${params.path} has returned an unexpected non-JSON response.`,
response,
),
)
}
Expand All @@ -127,7 +128,10 @@ async function sendResourceChange<
if (bodyParseResult.error === 'EMPTY_RESPONSE') {
if (params.isEmptyResponseExpected === false) {
return Promise.reject(
buildWretchError(`Request to ${params.path} has returned an unexpected empty response.`, response),
buildWretchError(
`Request to ${params.path} has returned an unexpected empty response.`,
response,
),
)
}

Expand Down Expand Up @@ -188,7 +192,10 @@ export async function sendGet<
return response as unknown as Promise<ResponseBody>
}
return Promise.reject(
buildWretchError(`Request to ${params.path} has returned an unexpected non-JSON response.`, response),
buildWretchError(
`Request to ${params.path} has returned an unexpected non-JSON response.`,
response,
),
)
}

Expand All @@ -197,7 +204,10 @@ export async function sendGet<
return null
}
return Promise.reject(
buildWretchError(`Request to ${params.path} has returned an unexpected empty response.`, response),
buildWretchError(
`Request to ${params.path} has returned an unexpected empty response.`,
response,
),
)
}

Expand Down

0 comments on commit 707a0cc

Please sign in to comment.