Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deleting an item from the Middleware stack should raise if the item i…
…s not found Currently if you call any `move` operation on the middleware stack with a middleware item that doesn't exist, [it will raise](https://github.com/rails/rails/blob/53d54694e9a423642ba9c984207097e9522db26f/actionpack/test/dispatch/middleware_stack_test.rb#L102). But the same doesn't happen if you call `delete` with a non-existant item. This makes it hard to debug issues like #42652 as the `delete` call fails silently. I think `delete` should raise same as `move` does, and this PR implements that. This would be a breaking change if someone has code calling `delete` on a non-existant middleware item, the fix would be to just remove that code since it's not doing anything.
- Loading branch information
1 parent
ef747e9
commit 07558ff
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters