Share this article

Improve this guide

406 Not Acceptable Error: What it Means & How to Fix

This error appears when the server returns data in unsupported format

3 min. read

Published onNovember 8, 2023

published onNovember 8, 2023

Share this article

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Key notes

406 Not acceptable error is an HTTP response status code, and it appears if the server can’t properly return the data. Since this is a server-side issue, the client request will fail and the code won’t be executed properly.

This can be a major issue, especially if you’re developing a service that processes various requests daily. Luckily, there are ways to fix this issue, and today we’ll show you how to do that.

What is the Call failed with status code 406 not acceptable error?

The error code 406 appears if the data returned from the server isn’t in a proper format that’s compatible with the client that made the request.

This is a security measure, and if the server doesn’t return the data in the expected format, the code won’t be executed.

How do I fix error 406?

How do I fix error 406?

1. Adjust the accept parameter in your code

Note that the accept parameter can only useapplication/jsonortext/csvvalue.

2. Use JSON.stringify

Keep in mind that this solution only works if the object is not a properly serialized JSON string.

3. Make sure you specify the user-agent in the header

What is the difference between HTTP 404 and 406?

The HTTP 406 client error response appears when the client sends a legitimate request, but the returned data isn’t in the accepted format.

On the other hand,HTTP error 404response code is one of the most common client-side errors and probably the most known 4xx error. It appears when the request can’t be processed because the requested data wasn’t found.

406 Not acceptable errors can appear in Java, Angular, and any other language that supports HTTP requests. This issue usually affects developers and not the average Internet users.

To fix it, ensure your client is configured to accept the specific type of data from the server as a response. You can also change server configuration and adjust configuration files so that the server and client both use the supported format.

This is just one of many errors you can encounter, and in the past, we coveredHTTP error 431andHTTP error 413, so don’t miss them if you need more information.

What method did you use to fix the 406 Not acceptable error in Nginx? Share your findings with us in the comments section.

More about the topics:server

Milan Stanojevic

Windows Toubleshooting Expert

Milan has been enthusiastic about technology ever since his childhood days, and this led him to take interest in all PC-related technologies. He’s a PC enthusiast and he spends most of his time learning about computers and technology.

Before joining WindowsReport, he worked as a front-end web developer. Now, he’s one of the Troubleshooting experts in our worldwide team, specializing in Windows errors & software issues.

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Milan Stanojevic

Windows Toubleshooting Expert

Before joining WindowsReport, he worked as a front-end web developer. Now, he’s specialized in Windows errors & software issues.