0.1.4 (#6)
All checks were successful
Publish / publish (push) Successful in 30s
Lint / lint (push) Successful in 13s

Co-authored-by: Julien Valverdé <julien.valverde@mailo.com>
Reviewed-on: https://gitea:3000/Thilawyn/reffuse/pulls/6
This commit was merged in pull request #6.
This commit is contained in:
Julien Valverdé
2025-03-24 19:39:29 +01:00
parent a7b5a32071
commit d01152bdcf
30 changed files with 938 additions and 327 deletions

View File

@@ -0,0 +1,21 @@
import { HttpClientError } from "@effect/platform"
import { ErrorHandler, QueryClient } from "@reffuse/extension-query"
import { Effect } from "effect"
export class AppQueryErrorHandler extends ErrorHandler.Service<AppQueryErrorHandler,
HttpClientError.HttpClientError
>()(
"AppQueryErrorHandler",
(self, failure, defect) => self.pipe(
Effect.catchTags({
RequestError: failure,
ResponseError: failure,
}),
Effect.catchAllDefect(defect),
),
) {}
export class AppQueryClient extends QueryClient.Service<AppQueryClient>()({ ErrorHandler: AppQueryErrorHandler }) {}