question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ErrorAccumulatingUnmarshaller from akka-http-json lib no longer applying validations in 0.9.2

See original GitHub issue

We have some Decoders with attached validations like this:

implicit val decodeSomething = deriveDecoder[Something].validate(..., ...)

And we use this for our akka-http routes (https://github.com/hseeberger/akka-http-json):

trait AkkaHttpCirceSupport extends BaseCirceSupport with ErrorAccumulatingUnmarshaller

And after updating to 0.9.2 that validation is no longer applied.

Switching to FailFastCirceSupport makes the validation run again. It’s probably related to https://github.com/circe/circe/pull/838/files, but I’m not sure.

Reverting to 0.9.1 makes ErrorAccumulatingUnmarshaller run validations again.

I put together a couple of tests showing this here: https://github.com/yurique/akka-http-json-fail/tree/validation-fail (validation-fail branch)

sbt test fails in one of the cases; changing circe to v0.9.1 makes them pass.

I’m not sure if this is related to circe or to akka-http-json lib.

/cc @hseeberger

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
travisbrowncommented, Mar 27, 2018

Confirmed—this slipped by in #838. Publishing a fix this afternoon.

0reactions
yuriquecommented, Mar 28, 2018

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Submission Validation Service for single project and multi ...
10/22/2019 • ERA Analyst (RH) Rule (005.21.11) which was added for validating and enforcing ORCID id requirements for application for individual ...
Read more >
Cerberus Changelog
Fix: when 'items' is applied to a list, field name is used as key for 'validator.errors', and offending field indexes are used as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found