Lobby error messages

The Lobby service returns errors in the "problem details" format (RFC 7807) including some additional fields that are consistent with most other UGS services.

Example:

{
  "title": "Bad Request",
  "status": 400,
  "code": 16000,
  "detail": "request failed validation",
  "details": [
    {
      "errorType": "validation",
      "message": "count in body should be less than or equal to 100"
    }
    {
      "errorType": "validation",
      "message": "skip in body should be greater than or equal to 0"
    }
  ],
  "type": "http://unity3d/lobby/errors/validation-error"
}

Error Status

FieldDescription
CodeA Unity services error code that uniquely identifies the type of error.
DetailA human-readable explanation specific to this occurrence of the problem.
DetailsA list of additional details about the specific error. See Error Details below.
StatusThe HTTP status code of the response.
TitleA short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.
TypeA URI that identifies the problem type and may provide documentation for the problem. These URLs are currently non-functional

Error Details

FieldDescription
ErrorTypeRepresents the type of error detail.
MessageProvides more information about the error.

Error codes

The code property of an error response from the Lobby service can be used to programmatically identify the type of problem that has occurred. These are used by the SDK to automatically resolve certain issues (e.g. refreshing an expired token, retrying a request that failed due to a transient error, etc.) and they are exposed to the developer in the exceptions thrown by the SDK so that the client can react appropriately.

Common error codes will be in the range 0-999. These are usually seen when there is an issue with some component in between the client and the lobby service (such as network connectivity, an authentication failure, or rate limit). In cases where these aren't handled transparently, they will usually indicate more serious errors with the service and should generally be more rare.

Lobby specific error codes will be in the range 16000-16999. These are used to identify specific error cases in the lobby service. Many of these are common and will occur during normal operation of the service and should be handled by the game developer to provide a smooth user experience. For example, when performing a Join action you may see the error LobbyNotFound (16001), which could just mean that the lobby you tried to join was deleted since the query results were returned and the game client should handle this gracefully.

It may seem like there is some overlap between certain common and lobby specific error codes (NotFound being the most obvious example), but they should not be handled the same way. The common NotFound error code likely indicates a functional problem with the SDK or API client (such as an incorrectly configured request URL). You should examine the error details for more information about the specific problem to identify how to resolve it.

CodeNameDescription
0UnknownUnknown is returned when the server is unable to determine what the error is.
1TransportErrorTransportError is returned when there are DNS, TLS or other transport errors.
2TimeoutTimeout is returned when no response was received in the allotted time causing the request to time out.
3ServiceUnavailableServiceUnavailable is typically returned when the service is unavailable because the service is overloaded or down due to service maintenance.
4ApiMissingApiMissing is returned when the API does not exist.
5RequestRejectedRequestRejected is returned when the request was rejected before any request reaches the API. See Title and Details for more information.
50TooManyRequestsTooManyRequests is returned when the request was rate limited because the client is making requests too frequently. See Lobby rate limits.
51InvalidTokenInvalidToken is returned when the authentication token is invalid.
52TokenExpiredTokenExpired is returned when the authentication token has expired.
53ForbiddenForbidden is returned when the user does not have permission to perform the requested operation.
54NotFoundNotFound is returned when the requested resource was not found.
55InvalidRequestInvalidRequest is returned when the request was understood but the API refused to process it because of a request validation error.
16000ValidationErrorValidationError is returned when there is a problem validating the user's request. The error details contain additional information about the problem.
16001LobbyNotFoundLobbyNotFound is returned when the requested lobby was not found.
16002PlayerNotFoundPlayerNotFound is returned when the requested player was not found in the lobby.
16003LobbyConflictLobbyConflict is returned when there was a conflict while trying to update the lobby. This could indicate that a player attempting to join a lobby was already a member, or there was an unresolvable issue while attempting to make some other update to the lobby.
16004LobbyFullLobbyFull is returned when the lobby that a user is trying to join already contains the maximum number of players.
16005LobbyLockedLobbyLocked is returned when the membership to the lobby has been locked and no new players can join.
16006NoOpenLobbiesNoOpenLobbies is returned when a QuickJoin request was unable to find a lobby with available space for the user to join.
16007LobbyAlreadyExistsLobbyAlreadyExists indicates that the Lobby cannot be created because it already exists.
16008LobbyNotModifiedLobbyNotModified indicates that the lobby resource has not been modified since the last observed version.
16009IncorrectPasswordIncorrectPassword player attempted to join with a password that did not match the lobby's password.
16010InvalidJoinCodeInvalidJoinCode indicates that a Join Code is not valid for some reason such as an invalid character.