Grape's error! Inside a Transaction Commits Your Data. Grape 4.1 Fixes It.
If your Grape API calls error! inside an Active Record transaction, the client gets an error response and the database keeps the writes. No exception, no warning, no rollback. The request looks failed from the outside and succeeded on the inside. A fix merged into Grape on October 3 and is queued for Grape 4.1.0. It’s not released yet, so every current Grape version still behaves this way. Here’s why it happens, how to check whether you’re affected, and what changes when 4.1 ships.