Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

#1452 simplify MethodsCompletionException implementation #1453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
osigida wants to merge 1 commit into slackapi:main
base: main
Choose a base branch
Loading
from osigida:simplify-method-completion-exception

Conversation

@osigida
Copy link

@osigida osigida commented Mar 12, 2025
edited
Loading

MethodsCompletionException is simplified; fixes #1452

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

@osigida osigida changed the title (削除) [1452] simplify MethodsCompletionException implementation (削除ここまで) (追記) fixes #1452: simplify MethodsCompletionException implementation (追記ここまで) Mar 12, 2025
@osigida osigida changed the title (削除) fixes #1452: simplify MethodsCompletionException implementation (削除ここまで) (追記) fixes #1452 simplify MethodsCompletionException implementation (追記ここまで) Mar 12, 2025
@osigida osigida changed the title (削除) fixes #1452 simplify MethodsCompletionException implementation (削除ここまで) (追記) #1452 simplify MethodsCompletionException implementation (追記ここまで) Mar 12, 2025
Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment
edited
Loading

Choose a reason for hiding this comment

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

Hi @osigida thanks for your interest and taking time to open a PR for this 💯

Unfortunately these changes would break the current interface contract established by by the library. We would consider this a breaking change and would need to include it as part of a major version.

We can include these types of improvements in our next major version but for the time being we do not have plans to release one in the near future.

I would suggest closing this PR for the time being and keeping #1452 open in order to track the feature request

Copy link
Author

osigida commented Mar 13, 2025

Hi @WilliamBergamin! thanks a lot for the reply.
I can make it backward compatible — just a few methods to support previous implementation.
And backward compatibility could be removed in 2.0
Should I?

@EqualsAndHashCode(callSuper = true)
public class MethodsCompletionException extends RuntimeException {

private final IOException ioException;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let me share my thoughts as former maintainer of this project:

The underlying API client (MethodsClient) can throw any of these, and the current implementation provides getters to access them. So, it's not because of the breaking change, these data structure should not be eliminated. I hear that having three types here could be unnecessary for most cases, but this could be still beneficial for other users.

If your concern is the lack of easy-to-use getMessage() method, the internal code could be changed just to override getMessage() to return the underlying exception's message string data. Only one of these three usually exists, so checking the existence of them one by one within overridden getMessage() method should work for the purpose.

This could be a minor breaking change, so ideally it should be considered in the next major version. But in practice, having such a change with sufficient notice in release notes should be okay too.

WilliamBergamin reacted with heart emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@WilliamBergamin WilliamBergamin WilliamBergamin requested changes

+1 more reviewer

@seratch seratch seratch left review comments

Reviewers whose approvals may not affect merge requirements

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

MethodsCompletionException is unnecessarily complex

AltStyle によって変換されたページ (->オリジナル) /