当我的oidc不可用时,我将在Quarkus生成的端点上返回此错误500:
<!doctype html>
<html lang="en">
<head>
<title>Internal Server Error - Error handling c1d5a584-89d8-49ba-9df0-822ecb9b47da-3, io.quarkus.oidc.OIDCException:
OIDC server is not available at the 'http://localhost:8080/auth/realms/test' URL. Please make sure it is
correct. Note it has to end with a realm value if you work with Keycloak, for example:
'https://localhost:8180/auth/realms/quarkus'</title>
<meta charset="utf-8">
<style>...是否可以使用所选的错误代码对其进行自定义,而不使用任何内容?
我试过用ExceptionMapper,但没有成功
发布于 2021-08-24 17:22:31
异常映射器将是您想要的,但是您可能需要使用JAX实现映射器(文档)的方式。这使您可以在映射器实现上设置一个@Priority,以便它比默认定义的映射器更早触发,这很可能是请求发生的情况。
https://stackoverflow.com/questions/68906669
复制相似问题