Skip to content

Commit

Permalink
feat: add extended payload error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
MoeQuadrat committed Mar 28, 2024
1 parent 74514f0 commit 605f6de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sbt.Compile
import sbt.Keys.cleanFiles
val releaseVersion = sys.env.getOrElse("TAG", "1.0.1-Gamma")
val releaseVersion = sys.env.getOrElse("TAG", "1.0.1")
addCommandAlias("publishSmithy4Play", "smithy4play/publish")
addCommandAlias("publishLocalSmithy4Play", "smithy4play/publishLocal")
addCommandAlias("generateCoverage", "clean; coverage; test; coverageReport")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ private[smithy4play] class SmithyPlayClientEndpoint[Op[_, _, _, _, _], I, E, O,
.map(o => HttpResponse(response.statusCode, headers, o))
.leftMap {
case error: PayloadError =>
SmithyPlayClientEndpointErrorResponse(error.expected.getBytes(), response.statusCode)
SmithyPlayClientEndpointErrorResponse(
s"Parsing Error: Expected: ${error.expected} at Path: ${error.path.toString()}".getBytes(),
response.statusCode
)
case error: MetadataError =>
SmithyPlayClientEndpointErrorResponse(error.getMessage().getBytes(), response.statusCode)
}
Expand Down

0 comments on commit 605f6de

Please sign in to comment.