Keep Getting Error “Bad Message 431”

559    Asked by Ayushigupta in Salesforce , Asked on Jul 19, 2021

Starting today, I keep getting the error "Bad Message 431", followed by "reason: Request Header Fields Too Large" when I refresh a console page in Salesforce. The page is  I'm using the latest version of Google Chrome. If I clear the cache, close and restart the browser, I can get to the page, but when I try to refresh the console, I keep getting this error.

Any ideas what could be happening and why this just started today? Why getting this http error 431? Thank You


Answered by Benjamin Moore

This happened to me today (Chrome - Developer Console)

The issue was I had lots of code from previous Execute Anonymous sessions that had been commented out. As I added new lines to the top such as below, I pushed the character limit as sent via Tooling API past the max value

   Lead[] leads = new list { new Lead(Company = 'Foo00', LastName = 'LName00'), new Lead(Company = 'Foo01', LastName = 'LName01') }; insert leads; leads[0].Company = 'Foo00Changed'; leads[1].Company = 'Foo01Changed'; leads[1].Website = 'www.failme.com'; // force partial success by failing this in VR Database.SaveResult[] results = Database.update(leads,false); // allow partial success /* many lines of code previously entered for prior tests. "Many" was in the hundreds */

By deleting some of those lines of commented out code, you can resolve http error 431.



Your Answer

Interviews

Parent Categories