Error codes

Edit this page

SRV010

The depth limit was reached.

  • Error: SerovalDepthLimitError
  • Step: parse or deserialize
  • Fields: limit, the depthLimit that was reached.

What it means

The value or the input is nested deeper than the depthLimit option allows. The default is 1000.

Common causes

  • A data structure that is nested thousands of levels deep, such as a long linked list.
  • Input built on purpose to exhaust the stack of the receiver.

How to fix it

  • Flatten the data, for example a linked list into an array.
  • Raise depthLimit on both sides if the depth is expected. Keep a limit on input you do not trust.