Feign exception missing. When an exception occurs in springboot 2.3. X, the message and exception in response are empty

Reason: because boot2.3. X may consider information security issues, the following two values are defaulted to

server:
  error:
    include-message: never
    include-exception: false

The exception is returned

{
  "timestamp": 1632713940269,
  "status": 500,
  "error": "Internal Server Error",
  "message": "",
  "path": "/xxxx"
}

After modification

server:
  error:
    include-message: always
    include-exception: true

The exception is returned

{
  "timestamp": 1632713940269,
  "status": 500,
  "error": "Internal Server Error",
  "exception": "com.xxxx.xxxxException",
  "message": "Illegal access",
  "path": "/xxxxx"
}

Similar Posts: