This might help you: https://docs.api7.ai/hub/error-page

On 2024/03/11 12:39:26 Ostap Kryvytskyy wrote:
> Colleagues, good morning! As an engineer, I want to change the APISIX
> response for the unauthorized scenario, so that internal protocol in
> between different apps communication in the cluster is respected.
>
> For example
> <html>
> <head><title>401 Authorization Required</title></head>
> <body>
> <center><h1> 401 Authorization Required</h1></center>
> <hr><center>openresty</center>
> <p><em>Powered by <a href="https://apisix.apache.org/
> ">APISIX</a>.</em></p></body>
> </html>
>
> Needs to be looking like this:
> { "errors": [ { "status": 401, "code": "UNAUTHORIZED_USER", "title": "Invalid
> token provided. User is unauthorized", "developer_message": "Invalid token
> provided. User is unauthorized", "links": [ { "rel": "about", "href": "
> https://genai.support.com&code=UNAUTHORIZED_USER"; } ] } ] }
> I need your advice, colleagues: how this can be achieved better?
>
> Thank you for letting me know! )
>

Reply via email to