Skip to content

Commit

Permalink
fix: Pattern match error in Endpoint.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
mobley-trent committed Dec 31, 2024
1 parent 0f7ccba commit a9a67e8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,21 +263,21 @@ final case class Endpoint[PathInput, Input, Err, Output, Auth <: AuthType](
case AuthType.Basic =>
HeaderCodec.basicAuth.transformOrFail {
case Header.Authorization.Basic(_, _) => Right(())
case _ => Left("Basic auth required")
case null => Left("Basic auth required")
} { case () =>
Left("Unsupported")
}
case AuthType.Bearer =>
HeaderCodec.bearerAuth.transformOrFail {
case Header.Authorization.Bearer(_) => Right(())
case _ => Left("Bearer auth required")
case null => Left("Bearer auth required")
} { case () =>
Left("Unsupported")
}
case AuthType.Digest =>
HeaderCodec.digestAuth.transformOrFail {
case _: Header.Authorization.Digest => Right(())
case _ => Left("Digest auth required")
case null => Left("Digest auth required")
} { case () =>
Left("Unsupported")
}
Expand Down

0 comments on commit a9a67e8

Please sign in to comment.