Skip to content

fix: Spec Store Error Boundary Reference#37

Open
stephenreid wants to merge 1 commit intostatsig-io:mainfrom
stephenreid:Fix-error-boundary-reference
Open

fix: Spec Store Error Boundary Reference#37
stephenreid wants to merge 1 commit intostatsig-io:mainfrom
stephenreid:Fix-error-boundary-reference

Conversation

@stephenreid
Copy link

@stephenreid stephenreid commented Feb 24, 2026

Summary

Fixes a NoMethodError in SpecStore by correcting an invalid reference to the error boundary. The code was previously attempting to call err_boundary (a local variable or undefined method) instead of the instance variable @error_boundary.

This error occurred when the SDK received a response with an invalid hashed SDK key, but it was likely swallowed or resulted in a crash depending on the surrounding rescue blocks.

Changes

  • Updated lib/spec_store.rb to use @error_boundary.log_exception instead of err_boundary.log_exception.
  • Added a new test file test/test_spec_store_error_boundary_usage.rb that mocks an invalid SDK key response and verifies that the exception is correctly logged to the error boundary endpoint.

Test Plan

  • Ran the newly added test test_process_specs_logs_to_error_boundary_on_invalid_key to confirm it now correctly catches the InvalidSDKKeyResponse and logs it via the network.
  • Verified that without the fix, the test fails with a NoMethodError.

… this was in the begin/end was not being caught correctly
@stephenreid stephenreid changed the title Spec Store Error Boundary Reference fix: Spec Store Error Boundary Reference Feb 24, 2026
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