ruby-grape / ruby-grape/grape

DEPRECATION WARNING: Using `return`, `break` or `throw` to exit a transaction block

Open
#2,197 5 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug?
Dominant language
Ruby
Stars
10k
Forks
1.2k
Avg merge
14h 38m
Merged PRs (30d)
92

Description

Hi

We hit this problem when upgrade rails to 6.1.4, found the error! function throw it, please help. Thanks

DEPRECATION WARNING: Using return, break or throw to exit a transaction block is
deprecated without replacement. If the throw came from
Timeout.timeout(duration), pass an exception class as a second
argument so it doesn't use throw to abort its block. This results
in the transaction being committed, but in the next release of Rails
it will rollback.

Screen Shot 2021-11-23 at 10 12 57 AM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Rails 6.1.4 deprecation warning described in the report and identify the Grape entry point involved in the transaction block. Confirm the expected transaction outcome and add or update coverage for the reported use of return, break, or throw; the issue does not name a file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.