How to resolve the error - bad message 431 reason request header fields too large?

194    Asked by DianeCarr in Salesforce , Asked on Jun 7, 2023

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?

Answered by Claudine Tippins

This happened to me today (Chrome - Developer Console), I received the error - bad message 431 reason request header fields too large - 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 = ''; // 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, the error went away.

Your Answer


Parent Categories