Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error Code & Description set in header instead of Body.

Not applicable

I have use case to set the error code and its message as in header variable instead of show the default fault Json in Body. Say example: Api Key policy failed due to invalid Api Key. I do not want to show default fault JSon in Body. Body should be Empty, but error code and its message should be in displayed in header variables. Here, error code 401 as part of header. So, only fault string also show in header.Screen shot shows how the error would be by default. Default fault json should go away.

3498-capture48.png

0 14 1,230
14 REPLIES 14
Top Solution Authors