PNDataSyncError

data class PNDataSyncError(val code: String, val message: String, val path: String? = null, val location: PNDataSyncErrorLocation? = null)

A single error item from a DataSync error response ({"errors":[...]}). One response may carry several items, e.g. one per invalid field for DS-0004.

Constructors

Link copied to clipboard
constructor(code: String, message: String, path: String? = null, location: PNDataSyncErrorLocation? = null)

Properties

Link copied to clipboard

Stable, machine-readable error code, e.g. DS-0302. Branch on this, not on message.

Link copied to clipboard

Position of the problem inside the path value. Only set for filter-expression errors (DS-1000..DS-1003).

Link copied to clipboard

Human-readable message from the server. Not stable; don't parse it.

Link copied to clipboard
val path: String?

Where the problem is, if known: a JSON Pointer, a query-parameter name (filter, sort, cursor…) or a field name.