Troubleshooting Center
Menu
← All guides

Machine translation · Korean original

HTTP 406 Not Acceptable: check the Accept header and choose a supported format

A request for data displays a 406 error and both supported formats.
Data inquiry screen example

On the website 406 Not Acceptable If you see this, first look for the list of available formats under the error title. If you're reading a document and see HTML in the list, go back to the original site's format selection screen and select HTML or View on Web. 406 is an HTTP status code used when the server does not provide a response that meets the requested conditions and does not respond in the default format instead.

Find available formats in the text

Leave the tab with the error in your computer browser or mobile phone. Read the instructions under the document title and read ‘Supported formats’, ‘Available formats’, ‘Only…’ Look for phrases like ‘supported’. The explanation may appear as a one-line English message, or as an item called message within the data enclosed in curly brackets. Either way, check the actual format name first.

A 406 screen informing you that HTML and JSON are supported for RTF requests.
Response screen example · Check text/html and application/json in the body.

For example, if you tried to receive a document as RTF, but the text says that only text/html and application/json are supported, the options presented by the service are HTML and JSON. What this message tells you is different from whether a PDF viewer is installed on the screen or how much storage space is left. Before you try to download the file right away, decide whether your goal is to read the original document or retrieve data.

MDN explains that when a server sends a 406, it is desirable to provide information in the body of the expression format that the user can select. There is no standard way to display the list. Not all 406 pages have a selection button, and some only show the number and title. Unless there is guidance, do not assume that the site actually supports HTML/JSON.

Re-select supported formats in reading documents

Return to the resource list or detail page of the official site from which you opened the document. If there is a menu such as ‘Format’, ‘Export’, or ‘Download’, see if the option you just checked is available. If there are separate options for viewing on the web and receiving files under the same title, if you want to read the content, select the web view first. On mobile, you may have to scroll down the screen to see different formats of the same material.

Screen for selecting HTML for web viewing on the detail page of public material A
Example Format Selection Screen · Select HTML to read this material.

In the example screen, select HTML for ‘Material A’. Since you are viewing a public document, all you need to do is open the page in the format you have chosen and check the document title and first paragraph. Even if the error disappears, if only the first screen of the site opens, you have not read the desired material. Conversely, if you choose JSON to use in your program, check whether the expected data items are returned instead of HTML for the cover or guide.

Information displayed on the screen select next Results to check
HTML·JSON provided Select HTML for reading purposes Original document title and body
JSON provided For data purpose, select JSON Items and Values Required
Show only 406 numbers Check the official resource list or access documentation Guide to actual application format

If there is no format selection menu, don't just add .pdf or .json to the end of the address. Some services send different expressions from the same address depending on the request conditions, while others provide separate official links for each material. Even if you change the file name in your browser or change the extension of the downloaded error screen, the content sent by the service will not change.

Read response conditions requested from Accept

If you are searching data following the examples in the development documentation, Accept Please check the items. Accept passes the media type the client wants back. In the MDN example, the client requests application/rtf, but the server returns a message that only text/html and application/json are provided. In this case, any program that can read JSON can query the same document by specifying Accept in the request as application/json according to the official usage example.

Even though Accept and Content-Type appear side by side, they have different meanings. The Content-Type of the request is the format of the body being sent, and the Content-Type of the response is the format of the body actually returned by the server. Just because you receive an error message in JSON, do not assume that the original data is only JSON. The selectable source format is checked based on the list in the error body or service document.

When language and encoding conditions are written

406 doesn't always mean the file type. Request conditions that the server can compare include Accept-Language, which indicates the response language, and Accept-Encoding, which indicates content encoding, such as compression. The Service may not strictly follow these terms in all requests. Some servers send the default document as a normal response when there is no correct expression, so it is difficult to find the cause simply by whether another site is opened.

For example, if the notice says ‘This document is available in English only’ and provides a link to the original English text, open the original text and check the title of the document. Before changing the entire language of your device, you can try the alternatives provided by the service. Conversely, there is no basis for assuming that language was a problem simply because the connection was made in Korean when there was no explanation of the format or language.

When you have no options or keep failing

If you select a supported format and the same document returns a 406, write down the document name, the menu you opened, the format you selected, and the text in the error body. ‘I selected web view on Publication A, but I got a 406. If you write something like, ‘HTML is supported in the body,’ the person in charge will know which options and responses to compare. Please leave only the public document path in your inquiry and do not send the download link with the account verification value attached.

If the service provides you with an alternative format, make sure it is the same version you originally requested. If the goal is to read the text, the completion criteria is when you check whether the title and content are correct, and if the task is to retrieve data, check whether the necessary items can be read in the correct format.

official data · MDN · 406 Not Acceptable

official help

Check official documentation ·

Inspection information

public status
public
Document inspection date
Scheduled for next review
direct reproduction
no record

This article was written based on official documents. We don't represent things as if we experienced them unless we reproduced them ourselves.