Skip to content

fix: replace broad exception handling with specific exceptions#1728

Open
ChaiWithJai wants to merge 1 commit intomasterfrom
fix/replace-broad-exception-handling
Open

fix: replace broad exception handling with specific exceptions#1728
ChaiWithJai wants to merge 1 commit intomasterfrom
fix/replace-broad-exception-handling

Conversation

@ChaiWithJai
Copy link
Copy Markdown
Collaborator

  • Replace 'rescue => e' with specific exception types in api_action.rb
  • Replace 'rescue Exception => e' with specific exceptions for email sending
  • Add specific HTTP and SMTP error handling in api_action.rb
  • Replace broad rescues in api_namespace.rb with ActiveRecord::RecordInvalid and JSON::ParserError
  • Replace broad rescue in ahoy/event.rb with ActiveRecord::StatementInvalid
  • Improve error messages to be more descriptive for debugging

This improves error handling precision and debugging capabilities.

- Replace 'rescue => e' with specific exception types in api_action.rb
- Replace 'rescue Exception => e' with specific exceptions for email sending
- Add specific HTTP and SMTP error handling in api_action.rb
- Replace broad rescues in api_namespace.rb with ActiveRecord::RecordInvalid and JSON::ParserError
- Replace broad rescue in ahoy/event.rb with ActiveRecord::StatementInvalid
- Improve error messages to be more descriptive for debugging

This improves error handling precision and debugging capabilities.
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.

1 participant