-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
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)); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Hier wurden vor allem die Nachrichten für falsche Spalten nicht ausgegeben, wodurch das ganze schwer nachzuvollziehen war für das Datenteam.