Skip to content
This repository has been archived by the owner. It is now read-only.

Improve error messages when an input can't start #1056

Closed
edmundoa opened this issue Jan 21, 2015 · 2 comments
Closed

Improve error messages when an input can't start #1056

edmundoa opened this issue Jan 21, 2015 · 2 comments
Assignees
Milestone

Comments

@edmundoa
Copy link
Member

@edmundoa edmundoa commented Jan 21, 2015

The text messages when an input can't be started should be a bit more human readable, at least remove the duplication. Here are a couple of examples:

  • Graylog2 Radio AMQP input:

    org.graylog2.plugin.inputs.MisfireException: Could not launch AMQP consumer., Could not launch AMQP consumer., foo

  • Syslog UDP:

    org.graylog2.plugin.inputs.MisfireException: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:1514, org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:1514, Failed to bind to: /0.0.0.0:1514, Address already in use

@edmundoa edmundoa added this to the 1.0.0 milestone Jan 21, 2015
@edmundoa edmundoa self-assigned this Jan 23, 2015
@kroepke
Copy link
Contributor

@kroepke kroepke commented Jan 23, 2015

@edmundoa check if we already have a method like "getMostSpecificCause" for an exception.
Elasticsearch has a helper method like that, and I vaguely remember having implemented this for graylog at some point, too.
Usually the message of that is what you want to display (eg "Address already in use")

edmundoa pushed a commit that referenced this issue Jan 26, 2015
@edmundoa
Copy link
Member Author

@edmundoa edmundoa commented Jan 26, 2015

@kroepke Thank you for the hint! In the end I could only find that method on the rest client module, which is not a dependency of the shared module, so I created a utility class in shared to help doing some common things with exceptions.

@edmundoa edmundoa closed this in 0ea2fb9 Jan 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants