Skip to content

Conversation

@Pfeil
Copy link
Member

@Pfeil Pfeil commented Jan 28, 2025

The pid-record field in a validation error is currently missing (see #258 ). It is likely caused by a change in some spring dependency.

Status: unsolved, figuring out what could cause this issue.

TODO

  • Add junit test
  • Add hurl test
  • get rid of WIP commits
  • fix
  • cleanup

Ideas to check:

  • Maybe it only does not work in tests. -> no, see below
    • This would explain that it seems to be registered properly when debugging, but somehow not being triggered
    • This would explain the test failing and why no test was created in the beginning
    • In this case, we should use a hurl test instead
    • Result: No, doesn't work out. But I have some logging which suggests the simplePidRecordConverter is asked if it wants to handle the response. Maybe we could use a message converter instead.
      2025-03-25 19:33:52 2025-03-25T18:33:52.309Z TRACE 23 --- [nio-8090-exec-5] e.k.d.p.w.c.SimplePidRecordConverter     : canRead: Checking applicability for class class edu.kit.datamanager.pit.domain.PIDRecord and mediatype application/vnd.datamanager.pid.simple+json;charset=UTF-8.
      2025-03-25 19:33:52 2025-03-25T18:33:52.309Z TRACE 23 --- [nio-8090-exec-5] e.k.d.p.w.c.SimplePidRecordConverter     : Read simple message from client and convert to PIDRecord.
      2025-03-25 19:33:52 2025-03-25T18:33:52.311Z  INFO 23 --- [nio-8090-exec-5] e.k.d.p.web.impl.TypingRESTResourceImpl  : Creating PID
      2025-03-25 19:33:52 2025-03-25T18:33:52.313Z TRACE 23 --- [nio-8090-exec-5] e.k.d.pit.pitservice.impl.TypingService  : Performing isIdentifierRegistered(sandboxed/5765f299-4098-4ee4-a363-585620e497ad).
      2025-03-25 19:33:52 2025-03-25T18:33:52.315Z DEBUG 23 --- [nio-8090-exec-5] .d.p.p.i.EmbeddedStrictValidatorStrategy : validating profile 21.T11148/301c6f04763a16f0f72a
      2025-03-25 19:33:52 2025-03-25T18:33:52.315Z TRACE 23 --- [nio-8090-exec-5] .d.p.p.i.EmbeddedStrictValidatorStrategy : Validating PID record against type definition.
      2025-03-25 19:33:52 2025-03-25T18:33:52.316Z TRACE 23 --- [nio-8090-exec-5] e.k.d.p.w.c.SimplePidRecordConverter     : canWrite: Checking applicability for class class org.springframework.http.ProblemDetail and mediatype null.
      2025-03-25 19:33:52 2025-03-25T18:33:52.316Z TRACE 23 --- [nio-8090-exec-5] e.k.d.p.w.c.SimplePidRecordConverter     : canWrite: Checking applicability for class class org.springframework.http.ProblemDetail and mediatype application/problem+json.
      
  • Figure out if we can use a message converter instead. See the SimplePidRecordConverter and the logging above for details.

@Pfeil Pfeil force-pushed the fix-ExtendedErrorAttributes branch from 9abd684 to 4ecbc62 Compare January 28, 2025 17:27
@Pfeil Pfeil added this to the 2.2.1 milestone Jan 28, 2025
@Pfeil Pfeil linked an issue Jan 28, 2025 that may be closed by this pull request
@Pfeil Pfeil force-pushed the fix-ExtendedErrorAttributes branch from 4ecbc62 to be68e40 Compare January 28, 2025 17:30
@coveralls
Copy link

Pull Request Test Coverage Report for Build #472

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 72.318%

Totals Coverage Status
Change from base Build #471: 0.0%
Covered Lines: 883
Relevant Lines: 1221

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExtendedErrorAttributes are not invoked anymore

3 participants