The HTTP Error 431: Request Header Fields Too Large response status code indicates that the origin server refuses to fulfill users’ requests. This issue happens when HTTP headers are too large.
When encountering this error, the following can be done to fix it:
- Checking the cookies
- Shortening the referrer URL
- Optimizing the code
Here is an article that can help you with the troubleshooting: