You won't receive this error when calling from an API.  It's not a validation error.  This error will only occur if there's a code level error.