KEYCLOAK-8224 Client not found error message
This commit is contained in:
parent
bed22b9b8d
commit
b5d8f70cc7
2 changed files with 10 additions and 4 deletions
|
@ -686,9 +686,15 @@ public class UserResource {
|
|||
}
|
||||
|
||||
ClientModel client = realm.getClientByClientId(clientId);
|
||||
if (client == null || !client.isEnabled()) {
|
||||
if (client == null) {
|
||||
logger.debugf("Client %s doesn't exist", clientId);
|
||||
throw new WebApplicationException(
|
||||
ErrorResponse.error(clientId + " not enabled", Status.BAD_REQUEST));
|
||||
ErrorResponse.error("Client doesn't exist", Status.BAD_REQUEST));
|
||||
}
|
||||
if (!client.isEnabled()) {
|
||||
logger.debugf("Client %s is not enabled", clientId);
|
||||
throw new WebApplicationException(
|
||||
ErrorResponse.error("Client is not enabled", Status.BAD_REQUEST));
|
||||
}
|
||||
|
||||
String redirect;
|
||||
|
|
|
@ -709,7 +709,7 @@ public class UserTest extends AbstractAdminTest {
|
|||
assertEquals(400, e.getResponse().getStatus());
|
||||
|
||||
ErrorRepresentation error = e.getResponse().readEntity(ErrorRepresentation.class);
|
||||
Assert.assertEquals("invalidClientId not enabled", error.getErrorMessage());
|
||||
Assert.assertEquals("Client doesn't exist", error.getErrorMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1108,7 +1108,7 @@ public class UserTest extends AbstractAdminTest {
|
|||
assertEquals(400, e.getResponse().getStatus());
|
||||
|
||||
ErrorRepresentation error = e.getResponse().readEntity(ErrorRepresentation.class);
|
||||
Assert.assertEquals("invalidClientId not enabled", error.getErrorMessage());
|
||||
Assert.assertEquals("Client doesn't exist", error.getErrorMessage());
|
||||
}
|
||||
|
||||
user.sendVerifyEmail();
|
||||
|
|
Loading…
Reference in a new issue