File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -624,7 +624,12 @@ These are the available config options for making requests. Only the `url` is re
624624 transitional: {
625625 // silent JSON parsing mode
626626 // `true` - ignore JSON parsing errors and set response.data to null if parsing failed (old behaviour)
627- // `false` - throw SyntaxError if JSON parsing failed (Note: responseType must be set to 'json')
627+ // `false` - throw SyntaxError if JSON parsing failed
628+ // Important: this option only takes effect when `responseType` is explicitly set to 'json'.
629+ // When `responseType` is omitted (defaults to no value), axios uses `forcedJSONParsing`
630+ // to attempt JSON parsing, but will silently return the raw string on failure regardless
631+ // of this setting. To have invalid JSON throw errors, use:
632+ // { responseType: 'json', transitional: { silentJSONParsing: false } }
628633 silentJSONParsing: true , // default value for the current Axios version
629634
630635 // try to parse the response string as JSON even if `responseType` is not 'json'
You can’t perform that action at this time.
0 commit comments