graylog-labs / graylog2-web-interface

[DEPRECATED]
https://www.graylog.org/
611 stars 174 forks source link

Trying to create a duplicate role name fails with "Internal Server Error" #1578

Closed bernd closed 9 years ago

bernd commented 9 years ago

Trying to create a role with a name that already exists does not show "Role Foo already exists" but only a 500 error.

screenshot from 2015-08-27 20 06 26

The server API already returns a "Role Foo already exists." message. So this is probably just a display issue.

[error] o.g.r.m.RolesService - Unable to create role Foo
org.graylog2.restclient.lib.APIException: API call failed POST http://@127.0.0.1:12900/roles returned 400 Bad Request body: {"type":"ApiError","message":"Role Foo already exists."}
[...]
at org.graylog2.restclient.models.RolesService.create(RolesService.java:68) ~[org.graylog2.graylog2-rest-client--1.2.0-rc.2-SNAPSHOT-1.2.0-rc.2-SNAPSHOT.jar:na]