# ErrorDetails

class ErrorDetails(val category: String, val code: String, val detail: String, val field: String? = null)

Detailed errors to explain a failure. Typically these are returned from Square's Connect v2 REST APIs, and are documented here. However, there may be conditions where an error is generated by the SDK itself, for example to explain errors that prevented server or cardreader communication.

## Constructors

ErrorDetails
Link copied to clipboard
constructor(category: String, code: String, detail: String, field: String? = null)

## Properties

category
Link copied to clipboard
val category: String

The high-level category of the error.

code
Link copied to clipboard
val code: String

The specific code of the error.

detail
Link copied to clipboard
val detail: String

A human-readable description of the error for debugging purposes. This will be localized to the device locale.

field
Link copied to clipboard
val field: String? = null

The name of the field provided in the original request, if any, that the error pertains to.