Jobs::HandledExceptionWrapper: Wrapped I18n::InvalidLocale for Jobs::UserEmail

Continuing the discussion from Failling jobs in Sidekiq : Jobs::UserEmail:

(I’m not convinced this is linked to the above, but the symptom was similar.)

After testing a group message to a group, I suddely got 2 of these retries alerted in Sidekiq with the error message Jobs::HandledExceptionWrapper: Wrapped I18n::InvalidLocale: "" is not a valid locale for the Jobs::UserEmail job.

Fortunately it’s not breaking anything critical, but worried it might be a problem if someone needs to send a group message. Any ideas?


Assuming you are right up to date, it’s probably related to this:

This method should be changed to validate the locale against I18n.available_locales.

  def user_locale(user)
    user.respond_to?(:locale) ? user.locale : nil
1 Like

Yeah I’m definitely up to the hour on tests-passed.

Can you check what locale returns for those users?

Should probably be

user.locale.present?, it is always going to respond


If you can send me exactly what to run, I can try to get this for you; but as a non-dev I’m not sure what you need. The username blurred out was my own, if that helps. :slight_smile:

Thanks, I think it’s sorted out.


This topic was automatically closed after 2 days. New replies are no longer allowed.