Search code examples
springspring-bootspring-cloudnetflix-zuul

Error Handling. How to pass the actual received error back


I am using the 1.1.2 spring-boot implementation. Currently the services I am calling from Zuul all work fine apart from when they return an error. For example, if the Service returns a 400 error with an error body, it seems to get translated in Zuul to

{
  "timestamp": 1466914349337,
  "status": 400,
  "error": "Bad Request",
  "message": "No message available"
}

So the question is, is it possible to either get Zuul to just forward the response in entirety, or simply at least set the message.

Example of configuration

zuul: 
 prefix: /api 
 ignoredHeaders: {'X-Application-Context'}
 routes:
  token:
   path: /token/**
   url: http://<server>:8001/token
   sensitiveHeaders: ''
   stripPrefix: true
.......

Thanks in advance.


Solution

  • I have switched to 1.1.4 Release and this is now working. Thankyou spencergib