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

fix(DEV-14053): vat id error message from api #596

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

Conversation

costa-monite
Copy link
Collaborator

@costa-monite costa-monite commented Feb 24, 2025

  • Added a new optional defaultMessage parameter
  • Changed the fallback message to use the provided defaultMessage if available, otherwise falls back to Unknown
  • The function now returns the custom default message instead of just "Unknown" when no specific error message is found
  • Updated the error handling in useCreateCounterpartVat hook
  • Instead of showing a generic "Failed to create VAT" message, it now uses getAPIErrorMessage
  • Passes the error object and the default message Failed to create VAT to get a more specific error message when available

Copy link

changeset-bot bot commented Feb 24, 2025

🦋 Changeset detected

Latest commit: 2604834

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@costa-monite costa-monite self-assigned this Feb 24, 2025
@costa-monite costa-monite added the pullpreview Generate a live preview for this pull request label Feb 24, 2025
Copy link
Contributor

github-actions bot commented Feb 24, 2025

🚀 Preview URLs are now available! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pullpreview Generate a live preview for this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants