"More than 15,000 'grammar' tokens" error when using the Budget API
search cancel

"More than 15,000 'grammar' tokens" error when using the Budget API

book

Article ID: 440925

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

When trying to create or update a budget via the GraphQL API, the call is failing with a 400 bad request error and returning a "More than 15,000 'grammar' tokens have been presented. To prevent Denial Of Service attacks, parsing has been cancelled." error message.

Cause

This is caused by trying to pass the full budget data as part of the GraphQL query as an inline string instead of a JSON formatted data field. This error is due to a GraphQL update that guards against overly large query documents that could be used for denial of service attacks.

Resolution

Pass the budget information as a JSON formatted data field and not as an inline string within the query document.