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(connector-fabric): reusable error handler in REST endpoints #3423

Merged

Conversation

ArchanaArige
Copy link
Contributor

@ArchanaArige ArchanaArige commented Jul 19, 2024

  1. Error-handling : Updates to the catch block of the Rest API endpoints of fabric package by importing the utility function handleRestEndpointException from cactus-core package that differentiates the user/developer errors.
  2. Minor code changes in the endpoints like adding the functions and formulating the error messages.

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@ArchanaArige This is looking great! Thank you very much for the contribution!

There were a couple of linter errors due to lack of auto-formatting applied to the code so I ran the auto-formatter and force pushed the changes to your branch to fix the CI checks.
Now it all should be green and ready to go. LGTM

1. Error-handling : Updates to the catch block of the Rest API endpoints
of fabric package by importing the utility function `handleRestEndpointException`
from cactus-core package that differentiates the user/developer errors.
2. Minor code changes in the endpoints like adding the functions and
formulating the error messages.

Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Signed-off-by: ArchanaArige <49356222+ArchanaArige@users.noreply.github.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@petermetz petermetz force-pushed the fabric-plugin-error-handling branch from 0a40630 to 715d19c Compare July 24, 2024 16:49
@petermetz petermetz merged commit d8a99c6 into hyperledger-cacti:main Jul 24, 2024
144 checks passed
@petermetz petermetz deleted the fabric-plugin-error-handling branch July 24, 2024 18:36
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.

3 participants