Skip to content

Fix find_handler_for method#3431

Merged
rmosolgo merged 2 commits intormosolgo:masterfrom
ogidow:fix-error-handlers
Apr 12, 2021
Merged

Fix find_handler_for method#3431
rmosolgo merged 2 commits intormosolgo:masterfrom
ogidow:fix-error-handlers

Conversation

@ogidow
Copy link
Copy Markdown
Contributor

@ogidow ogidow commented Apr 9, 2021

parent_handler will be assigned the result of find_handler_for method.

parent_handler = parent_errors.find_handler_for(error_class)

Since the parent_handler expects a hash object with :handler and :class as keys, find_handler_for method must maintain that interface

if parent_handler && handler && parent_handler[:class] < handler[:class]

@rmosolgo
Copy link
Copy Markdown
Owner

Thanks for the fix! I added a test, too.

@rmosolgo rmosolgo merged commit f889df3 into rmosolgo:master Apr 12, 2021
@rmosolgo rmosolgo added this to the 1.12.8 milestone Apr 12, 2021
@rmosolgo
Copy link
Copy Markdown
Owner

🚢 in 1.12.8!

@ogidow ogidow deleted the fix-error-handlers branch April 13, 2021 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants