MCPcopy
hub / github.com/axios/axios / throwIfDepthExceeded

Function throwIfDepthExceeded

lib/helpers/formDataToJSON.js:9–16  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

7const MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
8
9function throwIfDepthExceeded(index) {
10 if (index > MAX_DEPTH) {
11 throw new AxiosError(
12 'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,
13 AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED
14 );
15 }
16}
17
18/**
19 * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']

Callers 2

parsePropPathFunction · 0.85
buildPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected