It looks like you're trying to chain multiple effects using `Effect.zipRight`, but the way you're...

safeFetch, checkResponseOK, and responseToJSON are all functions that return an Effect

I want to check if its ok (will propagate error if not)

then transform into JSON (again another error here)

const complete = (messages : Message[]) => {
    return safeFetch({messages}).pipe(
      Effect.zipRight(checkResponseOk, responseToJSON)
    )
}


I'm doing something wrong, as TS is giving me errors on checkResponseIsOK

Argument of type '(res: Response) => Effect.Effect<void, BadResponse, never>' is not assignable to parameter of type 'Effect<unknown, unknown, unknown>'.
Was this page helpful?