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

Client validation does not provide invalid job context in error messages #4549

Closed
mperham opened this issue May 2, 2020 · 0 comments
Closed

Comments

@mperham
Copy link
Collaborator

mperham commented May 2, 2020

Sidekiq::Client#normalize_item runs several validations on the job payload and raises an error if the job format is incorrect but it does not show the incorrect job payload so the developer does not have the context necessary to quickly narrow down the source of the error. Example:

raise(ArgumentError, "Job must be a Hash with 'class' and 'args' keys: { 'class' => SomeWorker, 'args' => ['bob', 1, :foo => 'bar'] }") unless item.is_a?(Hash) ...

Does not actually include item in the error message...

@mperham mperham closed this as completed in 9dc9d08 May 2, 2020
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

No branches or pull requests

1 participant