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

feat(bpdm-gate): Extend error code #1003

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kunyao-cofinity-x
Copy link

Description

Enhance the error handling mechanism for the orchestrator and gate components by extending the list of available error codes. This will improve the visibility and detail of error information, particularly beneficial for the customer dashboard to understand why a data set could not be processed.

Currently, the orchestrator and gate components have a limited set of error codes. Extending these error codes will provide more granular information on processing failures, aiding in quicker diagnosis and resolution. This feature will update both the orchestrator and gate components to support a more comprehensive list of error codes.

Benefits

  • Improved Transparency: Customers can view detailed error reasons on the dashboard, enhancing trust and user experience.

  • Enhanced Debugging: Developers and support teams can identify and resolve issues more efficiently with detailed error information.

  • Better Monitoring: Allows for more precise monitoring and logging of errors, leading to improved system reliability.

New error types add to the following two classes

  • org.eclipse.tractusx.bpdm.gate.api.exception.BusinessPartnerSharingError
  • org.eclipse.tractusx.orchestrator.api.model.TaskErrorType

New error types

  • NaturalPersonError - The provided record contains natural person information.
  • BpnErrorNotFound - The provided record can not be matched to a legal entity or an address.
  • BpnErrorTooManyOptions - The provided record can not link to a clear legal entity.
  • MandatoryFieldValidationFailed - The provided record does not fulfill mandatory validation rules.
  • BlacklistCountryPresent - The provided record is part of a country that is not allowed to be processed by the GR process (for example: Brazil).
  • UnknownSpecialCharacters - The provided record contains unallowed special characters.

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

@kunyao-cofinity-x kunyao-cofinity-x self-assigned this Jul 18, 2024
@nicoprow nicoprow added this to the BPDM v6.2.0 milestone Jul 24, 2024
Copy link
Contributor

@nicoprow nicoprow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, the Schema annotation does not work with the used OpenAPI library after all. I discovered this, while improving the Orchestrator documentation. Please have a look at this file:

I had to write the OpenAPI description on the field description of the referencing class.

This would be in your case here:

@get:Schema(description = "The type of error that occurred", required = true)

And here:

@get:Schema(description = "One of the sharing error codes in case the current sharing state type is \"error\".")

Also, the code mapping TaskErrorType to GateErrorType is currently missing.

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.

2 participants