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

FEATURE: Use custom transformer for flow exceptions #242

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

markusguenther
Copy link
Member

The t3n GraphQL package includes a transformer that bypasses Flow Framework exceptions in GraphQL error handling. The error currently lacks the exception code as part of the information. By including this code (often a timestamp), we can render custom error messages in the backend and support localization.

Screenshot 2024-10-23 at 12 27 54

Relates: #240

@markusguenther
Copy link
Member Author

It is not done yet but hopefully the idea is not so wrong.

@Sebobo Sebobo added the Feature A new feature label Oct 26, 2024
@markusguenther markusguenther force-pushed the feature/localized-exceptions branch from 0e66ff8 to 84b3c95 Compare October 28, 2024 09:11
@markusguenther
Copy link
Member Author

Hopefully localized now all error messages and warnings we have in the codebase.
The acceptance tests run locally.

Screenshot 2024-10-29 at 10 32 14

@Sebobo Sebobo self-requested a review October 29, 2024 18:33
Copy link
Member

@Sebobo Sebobo left a comment

Choose a reason for hiding this comment

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

Still have to verify the change locally but thx already!

The German translation still needs some adjustments.

Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
Resources/Private/Translations/de/Main.xlf Outdated Show resolved Hide resolved
@markusguenther markusguenther force-pushed the feature/localized-exceptions branch from 6acb336 to 4023457 Compare October 29, 2024 19:10
@markusguenther
Copy link
Member Author

Thanks for the feedback, updated the labels!

@Sebobo
Copy link
Member

Sebobo commented Nov 1, 2024

Hmm when I checkout the branch and build the module I now get 2 error messages:
CleanShot 2024-11-01 at 14 29 05@2x

@markusguenther
Copy link
Member Author

Hmm when I checkout the branch and build the module I now get 2 error messages: CleanShot 2024-11-01 at 14 29 05@2x

I guess that one error is thrown by the application itself and the other comes from the backend as a flash message.

@markusguenther
Copy link
Member Author

In the end with the PR #241 that should not happen anymore.

@markusguenther
Copy link
Member Author

Screenshot 2024-11-02 at 17 31 52

The behavior did not change, just the labels are different now and as I mentioned, with the validation before creating the tag we prevent having two flash messages.

@markusguenther markusguenther force-pushed the feature/localized-exceptions branch from 1d82b4c to 47c2d35 Compare November 2, 2024 17:34
@Sebobo Sebobo force-pushed the feature/localized-exceptions branch from 47c2d35 to a3bf910 Compare November 4, 2024 13:05
markusguenther and others added 3 commits November 4, 2024 14:12
The t3n GraphQL package includes a transformer that bypasses Flow Framework exceptions in GraphQL error handling. The error currently lacks the exception code as part of the information. By including this code (often a timestamp), we can render custom error messages in the backend and support localization.
@Sebobo Sebobo force-pushed the feature/localized-exceptions branch from bab4ec5 to 6646240 Compare November 4, 2024 13:12
@Sebobo Sebobo merged commit d7e8843 into Flowpack:main Nov 4, 2024
5 checks passed
@Sebobo
Copy link
Member

Sebobo commented Nov 4, 2024

Thx! I squashed the commits a bit and removed the bundled files. Also I fixed the duplicate error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants