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

Emitting errors should work, and they should be displayed on the platform #113

Open
5 tasks
hannah-bulmer opened this issue Nov 11, 2019 · 0 comments
Open
5 tasks

Comments

@hannah-bulmer
Copy link

There are two different cases that need to be handled for this issue:

verifyCredentials

Right now, both throwing an error and emitting an error successfully will mark the provided credentials as incorrect, but an error message does not display to the platform in either case.

For example,

verify(credentials) {
  this.emit('error', 'Credentials are invalid');
  throw new Error('Credentials are not working!!');
}

will both mark the credentials are invalid, but in both cases the logs will not show any sort of error.

This has been further discussed in these issues:
#58
#68

For this issue to be resolved,

  • emitting an error from verify should both invalidate the credentials and display the error message
  • throwing an error from verify should both invalidate the credentials and display the error message

init, startup, shutdown

Building off of #112, for these three functions it should be investigated and discussed whether we should implement emit error. If we are not implementing emit error for this function at this time, it should be noted in documentation that these functions are not currently supported

For this issue to be resolved,

  • investigate the implementation if this.emit('error') for these functions - also see Add logger to init, startup, shutdown #109
  • investigate if any platform changes would be needed
  • implement the change, or add documentation accordingly
@hannah-bulmer hannah-bulmer changed the title Sailor enhancement/bug: emitting errors should work, and display to the platform Sailor enhancement/bug: emitting errors should work, and they should be displayed on the platform Nov 11, 2019
@hannah-bulmer hannah-bulmer changed the title Sailor enhancement/bug: emitting errors should work, and they should be displayed on the platform Emitting errors should work, and they should be displayed on the platform Nov 11, 2019
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

No branches or pull requests

1 participant