.createDtoFromJson(toJson(response), KeycloakTokenResponse.class); } catch (BadRequestException e) { if (assotiateUserPattern.matcher(e.getMessage()).matches()) { throw new UnauthorizedException(e.getMessage());
@Override public Installer getInstaller(String installerKey) throws InstallerException { checkConfiguration(); try { return requestFactory .fromUrl( UriBuilder.fromUri(registryServiceUrl) .path(InstallerRegistryService.class, "getInstaller") .build(installerKey) .toString()) .useGetMethod() .request() .asDto(InstallerDto.class); } catch (NotFoundException e) { throw new InstallerNotFoundException(e.getMessage(), e); } catch (BadRequestException e) { throw new IllegalInstallerKeyException(e.getMessage(), e); } catch (IOException | ApiException e) { throw new InstallerException(e.getMessage(), e); } }
@Override public List<Installer> getOrderedInstallers(List<String> installerKeys) throws InstallerException { checkConfiguration(); try { return new ArrayList<>( requestFactory .fromUrl( UriBuilder.fromUri(registryServiceUrl) .path(InstallerRegistryService.class, "getOrderedInstallers") .build() .toString()) .usePostMethod() .setBody(installerKeys) .request() .asList(InstallerDto.class)); } catch (NotFoundException e) { throw new InstallerNotFoundException(e.getMessage(), e); } catch (BadRequestException e) { throw new IllegalInstallerKeyException(e.getMessage(), e); } catch (IOException | ApiException e) { throw new InstallerException(e.getMessage(), e); } }
+ "' identity provider", e); if (e.getMessage().endsWith("Invalid token.")) { throw new InfrastructureException( "Your session has expired. \nPlease " + "</a> to Che again to get access to your Openshift account"); throw new InfrastructureException(e.getMessage(), e); } catch (Exception e) { LOG.error(