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

Import better rejection message #3415

Merged
merged 5 commits into from
Apr 30, 2024

Conversation

awildturtok
Copy link
Collaborator

Hier wurden vor allem die Nachrichten für falsche Spalten nicht ausgegeben, wodurch das ganze schwer nachzuvollziehen war für das Datenteam.

@awildturtok awildturtok requested a review from thoniTUB April 30, 2024 09:20
log.error("Problems concerning Import `{}`:\n{}", name, errors);
throw new IllegalArgumentException(String.format("Headers[%s.%s] do not match Table[%s]. More info in logs.", getTable(), getName(), table.getId()));
log.error("Problems concerning Import `{}`:\n - {}", name, errors);
throw new BadRequestException(String.format("Import[%s.%s] does not match Table[%s]: %s", getTable(), getName(), table.getId(), errors));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ich würde hier keine webexception werfen sondern auf Resource- oder Processor-Ebene abfangen und dort werfen

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ImportJob createOrUpdate wirft auch kontext-abhägige WebExceptions. Ich kann das assertMatch da rein schieben, dann ist das zumindest so gekapselt

@awildturtok awildturtok requested a review from thoniTUB April 30, 2024 10:39
@awildturtok awildturtok merged commit 0e37263 into develop Apr 30, 2024
6 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feature/import-better-rejection-message branch April 30, 2024 14:23
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