Skip to content

Conversation

@bougyman
Copy link
Member

@bougyman bougyman commented Aug 5, 2025

No description provided.

Copilot AI review requested due to automatic review settings August 5, 2025 15:30
@bougyman bougyman added the bug Something isn't working label Aug 5, 2025
@bougyman bougyman self-assigned this Aug 5, 2025
@bougyman bougyman added the bug Something isn't working label Aug 5, 2025
@bougyman bougyman requested a review from BryceARich August 5, 2025 15:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a method signature mismatch in the respond_with_error method by removing the code parameter that was not being accepted by the underlying implementation.

  • Removed the code parameter from respond_with_error method signatures
  • Updated method calls to no longer pass the code argument
  • Updated tests to reflect the simplified error handling

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
lib/leopard/message_wrapper.rb Removed code parameter from respond_with_error method signature and call
test/lib/message_wrapper.rb Updated test mock and test cases to match new method signature
examples/echo_endpoint.rb Added new endpoint and reduced instance count (unrelated to main fix)
Comments suppressed due to low confidence (1)

test/lib/message_wrapper.rb:69

  • This test assertion expects only the error message, but the test doesn't explicitly call respond_with_error on line 67. The test should ensure it's testing the correct behavior by explicitly calling the method with the exception object.
    assert_equal ['broken'], msg.error_args

end

# @param err [String, Exception] The error message or exception to respond with.
# @param code [Integer] The HTTP status code to use for the error response.
Copy link

Copilot AI Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation comment still references the removed code parameter. This should be removed to match the updated method signature.

Suggested change
# @param code [Integer] The HTTP status code to use for the error response.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@BryceARich BryceARich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bougyman bougyman merged commit 9d87b8c into main Aug 5, 2025
4 checks passed
@bougyman bougyman deleted the fix-respond-with-error branch August 5, 2025 15:32
This was referenced Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants