Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: introduced message classes for errors #4540

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

wolf4ood
Copy link
Contributor

@wolf4ood wolf4ood commented Oct 10, 2024

What this PR changes/adds

introduced message classes for errors.

It replaces in DspRequst the errorType instead each controllers passes a provider/builder for building the expected error in output.

Introduced classes for errors:

  • ErrorMessage (base class)
  • CatalogError
  • ContractNegotiationError
  • TransferError
  • VersionsError

If there is an error when serving the request the DspRequestHandler will create use the errorr provider to enrich
it with common expected properties and then will use the versioned transformer registry for serializing the error in the correct format.

Why it does that

Multi-protocol support

Further notes

List other areas of code that have changed but are not necessarily linked to the main feature. This could be method
signature changes, package declarations, bugs that were encountered and were fixed inline, etc.

Linked Issue(s)

Closes #4536

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@wolf4ood wolf4ood self-assigned this Oct 10, 2024
@wolf4ood wolf4ood added the refactoring Cleaning up code and dependencies label Oct 10, 2024
@wolf4ood wolf4ood force-pushed the refactor/4536_dsp_errors_ser branch 3 times, most recently from 96cf363 to 653e28a Compare October 11, 2024 12:51
@wolf4ood wolf4ood marked this pull request as ready for review October 11, 2024 13:25
@wolf4ood wolf4ood merged commit 8f43ec8 into eclipse-edc:main Oct 14, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Cleaning up code and dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor dsp error serialization
4 participants