🍋 Yuzu

Dashboard

Getting Started

The Yuzu Platform

Guides

Creating API Keys

Rate Limits

Usage with Apollo React/React Native

Recipes

Build a live-updating stock price badge

Show the latest exchange rates for your product

Streaming API

Subscription and Authorization

Available streams

Message reference

GraphQL API

Introduction to GraphQL

Making GraphQL Requests

Authorization

Pagination

Errors

Schema Reference

GraphQL API

Errors

Errors are a part of life. The guide below will help you understand the various codes Yuzu will return and recovery patterns.

Error responses


Error responses in GraphQL will not present like errors from traditional APIs. All responses from GraphQL APIs, execept network errors (e.g., 503 Bad Gateway), will return a 200 status code. In an error message, however, the data parameter will be null, replaced by errors, e.g.:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  "errors": [
    {
      "message": "limit must be less than or equal to 500",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "cryptoTradingPairs"
      ],
      "extensions": {
        "code": "BAD_USER_INPUT"
      }
    }
  ],
  "data": null
}

Yuzu uses the extensions object to specify a code which can be handled, e.g., BAD_USER_INPUT in the example above.

Errors

Code Recoverable? Description Recovery
UNAUTHENTICATED No Returned when no API keys is present in the request N/A
FORBIDDEN No Returned when the host is not properly allow-listed N/A
RATE_LIMIT_EXCEEDED Yes Returned when client has exceeded the request limit on community plans Wait 1 second until the request count is reset
BAD_USER_INPUT Yes Returned when input is invalid If input is from user, display the error message and collect new input

Pagination

Schema Reference