0

Is it possible to delete the message in the response?

{
  "message": "PERMISSION_DENIED: The API targeted by this request is invalid for the given API key.",
  "code": 403
}

I prefer not to expose information to users. In this particular case a 403 http error would be enough.

lascarayf
  • 3,423
  • 3
  • 19
  • 24
  • Please provide JSON as text not as image. – vladsiv Oct 06 '21 at 15:04
  • Can you elaborate your question and explain the context a bit more? How are you using the API gateway? The endpoints are connected to which services? Why is it showing the above error message. Are you not providing the correct api key? When you say change/hide default error message response, do you want to remove the default [error model](https://cloud.google.com/apis/design/errors) messages for cloud APIs ? There are lot of questions that are coming up while reading your question.Try to rephrase/edit the question with more of such details so that I can reproduce your issue. – Priyashree Bhadra Oct 08 '21 at 11:45

0 Answers0