Skip to content
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

feat: use a common Err for permission denied #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guilhem
Copy link

@guilhem guilhem commented Oct 28, 2022

This error can be used in ConnectionFailedCallback to know error with error.Is().

This error can be used in ConnectionFailedCallback to know error with
error.Is().
@@ -29,6 +28,8 @@ var DefaultChannelHandlers = map[string]ChannelHandler{
"session": DefaultSessionHandler,
}

var ErrPermissionDenied = errors.New("permission denied")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could be in a single var statement with all error types.

@gustavosbarreto
Copy link
Collaborator

gustavosbarreto commented Dec 21, 2022

@guilhem Could you please write a test case for these error type?

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.

2 participants