Skip to content

Commit

Permalink
Update ErrorResponseConfig.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
asr2003 authored Nov 9, 2024
1 parent dc1f3f4 commit 95fd8a3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

package zio.http

import zio._
Expand All @@ -22,6 +23,7 @@ final case class ErrorResponseConfig(
withStackTrace: Boolean = false,
maxStackTraceDepth: Int = 10,
errorFormat: ErrorResponseConfig.ErrorFormat = ErrorResponseConfig.ErrorFormat.Html,
logCodecErrors: Boolean = false,
)

object ErrorResponseConfig {
Expand All @@ -34,7 +36,7 @@ object ErrorResponseConfig {

val default: ErrorResponseConfig = ErrorResponseConfig()
val debugConfig: ErrorResponseConfig =
ErrorResponseConfig(withErrorBody = true, withStackTrace = true, maxStackTraceDepth = 0)
ErrorResponseConfig(withErrorBody = true, withStackTrace = true, maxStackTraceDepth = 0, logCodecErrors = true)

private[http] val configRef: FiberRef[ErrorResponseConfig] =
FiberRef.unsafe.make(default)(Unsafe)
Expand Down

0 comments on commit 95fd8a3

Please sign in to comment.