The most cursed bug of 2024

Reviewing error reports in Bugsnag today, I came across this beauty:

ArgumentError
foo#create
'Artículo' is not a valid foo_type raise ArgumentError, "'#{value}' is not a valid #{name}"
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 day ago
Oct 14th, 05:48:29 UTC

production

unhandled

gems/activerecord-7.2.1/lib/active_record/enum.rb:215:in `assert_valid_value': 'Artículo' is not a valid foo_type

          raise ArgumentError, "'#{value}' is not a valid #{name}"
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (ArgumentError)
    from gems/activemodel-7.2.1/lib/active_model/attribute.rb:79:in `with_value_from_user'
    from gems/activemodel-7.2.1/lib/active_model/attribute_set.rb:60:in `write_from_user'
...

It seems that what's going on is that the client is running some sort of translation software, that is *modifying the JSON content of POSTs*.

That is, the endpoint being POSTed to expects a foo_type of Article and is instead receiving (Portuguese according to my boss) Artículo instead. *Something* is intercepting the request, and "translating" the fields it includes.

This is so cursed. So unbelievably cursed. So cursed it has to take the prize for the most cursed bug I've seen in 2024, and the year isn't even over yet.

I wonder what horrors the poor user is experiencing as a result of this behaviour?

Happy Halloween!

                                       _
                       /\              )\
         _           __)_)__        .'`--`'.
         )\_      .-'._'-'_.'-.    /  ^  ^  \
      .'`---`'. .'.' /o\'/o\ '.'.  \ \/\/\/ /
     /  <> <>  \ : ._:  0  :_. : \  '------'       _J_
     |    A    |:   \\/\_/\//   : |     _/)_    .'`---`'.
     \  <\_/>  / :  :\/\_/\/:  : /   .'`----`'./.'0\ 0\  \
    _?_._`"`_.'`'-:__:__:__:__:-'   /.'<\   /> \:   o    |
 .'`---`'.``  _/(              /\   |:,___A___,|' V===V  /
/.'a . a  \.'`---`'.        __(_(__ \' \_____/ /'._____.'
|:  ___   /.'/\ /\  \    .-'._'-'_.'-:.______.' _?_
\'  \_/   |:   ^    |  .'.' (o\'/o) '.'.     .'`"""`'.
 '._____.'\' 'vvv'  / / :_/_:  A  :_\_: \   /   ^.^   \
           '.__.__.' | :   \'=...='/   : |  \  `===`  /
        jgs           \ :  :'.___.':  : /    `-------`
                       '-:__:__:__:__:-'

If you'd like to comment on any of my posts, please visit my public inbox.

---

Home

Why Gemini?

Projects

Gemlog

Contact me

Brought to you by Halp