Skip to content

Commit

Permalink
fix failing error reporters.
Browse files Browse the repository at this point in the history
  • Loading branch information
patroza committed Jun 12, 2024
1 parent 33d58cb commit 5a840c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-beers-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-app/infra": patch
---

fix failing error report
6 changes: 4 additions & 2 deletions packages/infra/src/errorReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export function reportError(
__cause__: tryToJson(error),
__error_name__: name
})),
Effect.catchAll(() => Effect.logError("Failed to log error"))
Effect.catchAllCause((cause) => Effect.logError("Failed to log error", cause)),
Effect.catchAllCause(() => Effect.logError("Failed to log error cause"))
)
)
error[ErrorReported] = true
Expand Down Expand Up @@ -83,7 +84,8 @@ export function logError<E>(
__cause__: tryToJson(error),
__error_name__: name
})),
Effect.catchAll(() => Effect.logError("Failed to log error"))
Effect.catchAllCause((cause) => Effect.logError("Failed to log error", cause)),
Effect.catchAllCause(() => Effect.logError("Failed to log error cause"))
)
)
})
Expand Down

0 comments on commit 5a840c6

Please sign in to comment.