Documentation

​
​

Development

User Acquisition

Monetization

Industry

Economy

Unity SDK

Economy

LiveOps
​
​
Economy
  • Overview
  • Get started
  • Concepts
  • Tutorials
  • Reference
    • Economy SDK guide
      • Installation
      • Configuration
      • Common objects
      • Player balances
      • Player inventory
      • Purchases
      • Editor tools
      • Exceptions
      • Quick reference
      • Game Overrides
    • Parameters of operation
  • Privacy and consent
  1. Economy
  2. Economy SDK guide

Exceptions

Understand the different exceptions the Economy SDK throws when errors occur.
Read time 2 minutes
Last updated 8 months ago

Economy exception

An
EconomyException
is thrown when there is a problem with one of the operations in the SDK. These exceptions should be handled by calling code. The methods that can throw these exceptions are clearly marked in the method documentation.
The
EconomyException
has the following field in addition to those normally provided by C#
Exception
:
  • Reason
    : An
    EconomyExceptionReason
    is an enum value that describes what category of issue occurred. This is provided to allow a code-friendly way of detecting and handling the different types of errors that can be thrown.
Inspect the
Message
field on an
EconomyException
for a human-readable description of the error that was thrown.
There are method-specific exceptions that may also be thrown by the Economy SDK. These are specified in the method documentation.

Economy validation exception

EconomyValidationException
inherits from
EconomyException
and is thrown when there is a validation error in the SDK, for example, if you try to set an ID with an invalid character.
EconomyValidationException
gives more insight into the validation issues that come up after reaching the service.
It contains one extra field:
  • Details
    : This is a list of errors returned from the API's Validation Error Response. It is a list of economy validation error details.

Economy validation error detail

An
EconomyValidationErrorDetail
represents a single error returned from the API's Validation Error Response.
It contains two fields:
  • Field
    : The field in the data that caused the error. This is a string.
  • Messages
    : Messages that describe the errors. This is a list of strings.

Economy rate limited exception

EconomyRateLimitedException
inherits from
EconomyException
and is thrown when the number of requests has exceeded the rate limit.
It contains one extra field:
  • RetryAfter
    : The number of seconds until the client is no longer rate limited. This is an int.

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Economy exception

    • Economy validation exception

      • Economy validation error detail

    • Economy rate limited exception


Report a problem with this page