Skip to content

Name collision of detailed_message method between Exception classes in aws-sdk-neptunedata gem and Ruby 3.2+ #3383

Description

@ricardogpsf

Describe the bug

In Ruby 3.2, Exception#full_message was updated to internally call detailed_message(highlight:) (a Ruby built-in method) passing a keyword argument (code here). All 34 error classes in aws-sdk-neptunedata define a detailed_message (code here) to expose the API-level detailed_message field (consequently, that method definition becomes a method override when using ruby 3.2+), but none accepted the highlight: keyword, causing an ArgumentError whenever Ruby or tooling calls full_message on these exceptions.

A real example of that error happening is in OpenTelemetry SDK's span.record_exception(e) (code here), which calls e.full_message(highlight: false, order: :top) (code here) to capture the stacktrace. This silently breaks tracing and any instrumentation that records exceptions on spans since raises the error.

As a temporary fix, I've overridden the detailed_message in all error classes in aws-sdk-neptunedata as monkey patch to also accept right parameters, so it avoids the exception being raised when calling the detailed_message, so my code can work properly.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

A way to make the exceptions classes from API work well with Ruby 3.2+ updates.

Current Behavior

There is a name collision of method detailed_message between error classes in aws-sdk-neptunedata API and Ruby 3.2+ built-in base exception class, so it raises an ArgumentError exception when the method is called with parameters.

Reproduction Steps

Instantiate an exception/error class from aws-sdk-neptunedata, call the method full_message (buil-in in ruby 3.2+), it'll raise an ArgumentError.

Possible Solution

Change the method name in the API from detailed_message to any other. 🤷 It'll require a new major version of the gem. =/
At least it'll keep the API behavior consistent and keep the ruby exception behavior as it is.

Overrride explicit the detailed_message with a a specific behavior for the API. It'll keep backward compatibilities (a minor/patch bump), but will change the default behavior of the ruby exception message, anyway a good documentation could make it ok for users.

Well, looking forward to know how you folks will decide to resolve that issue. =)

Additional Information/Context

No response

Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version

aws-sdk-neptunedata in any version with detailed_message method defined in error classes

Environment details (Version of Ruby, OS environment)

Ruby 3.2+

Activity

  1. added
    bugThis issue is a bug.
    needs-triageThis issue or PR still needs to be triaged.
    on May 14, 2026
  2. self-assigned this
    on May 14, 2026
  3. added
    in-progressWork is in progress to resolve the issue.
    and removed
    needs-triageThis issue or PR still needs to be triaged.
    on May 14, 2026
  4. github-actions commented on May 15, 2026

    @github-actions

    This issue is now closed. Comments on closed issues are hard for our team to see.
    If you need more assistance, please open a new issue that references this one.

  5. jterapin commented on May 15, 2026

    @jterapin
    Contributor

    A new version of the gem is planned to be released today. I'll circle back when it is released.

  6. added
    closing-soonThis issue will automatically close in 4 days unless further comments are made.
    and removed
    in-progressWork is in progress to resolve the issue.
    on May 15, 2026
  7. jterapin commented on May 15, 2026

    @jterapin
    Contributor

    An updated gem has been released: https://rubygems.org/gems/aws-sdk-neptunedata

    Let me know if you have any questions.

  8. removed
    closing-soonThis issue will automatically close in 4 days unless further comments are made.
    on May 16, 2026
  9. github-actions commented on May 27, 2026

    @github-actions

    This issue is now closed. Comments on closed issues are hard for our team to see.
    If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions