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

Conversation

kunyao-cofinity-x
Copy link
Contributor

@kunyao-cofinity-x kunyao-cofinity-x commented Jul 18, 2024

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.

@kunyao-cofinity-x kunyao-cofinity-x force-pushed the feat/Extend-error-states-v6 branch 2 times, most recently from d46940e to 463cdc0 Compare November 20, 2024 10:04
@nicoprow nicoprow added enhancement New feature or request standards-relevant The issue has an impact on the Catena-X standards labels Nov 22, 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.

@kunyao-cofinity-x

Your contribution code is fine but some formalities are missing.

  1. Please rebase to the newest state of main
  2. Sine your contribution changes the API of Gate and Orchestrator please add the updated openAPI documents in the docs/api folder
  3. Add a CHANGELOG entry with a reference to the issue

After that, the contribution is ready to merge

@kunyao-cofinity-x kunyao-cofinity-x force-pushed the feat/Extend-error-states-v6 branch from 2f7d569 to 9ef00b1 Compare December 4, 2024 16:03
@kunyao-cofinity-x kunyao-cofinity-x force-pushed the feat/Extend-error-states-v6 branch from 9ef00b1 to d8baaf9 Compare December 5, 2024 06:10
@kunyao-cofinity-x kunyao-cofinity-x force-pushed the feat/Extend-error-states-v6 branch from d8baaf9 to 8914df8 Compare December 5, 2024 06:38
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.

LGTM

Copy link
Contributor

@SujitMBRDI SujitMBRDI left a comment

Choose a reason for hiding this comment

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

LGTM

@nicoprow nicoprow merged commit 3dd7c35 into eclipse-tractusx:main Dec 6, 2024
15 checks passed
@nicoprow
Copy link
Contributor

nicoprow commented Dec 6, 2024

Contributes to eclipse-tractusx/sig-release#727

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request standards-relevant The issue has an impact on the Catena-X standards
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants