CLASS

Problem

Contents

swift
public class Problem: ProblemRepresentation, Decodable, Equatable

Problem response indicates an error occurred on the server. Responses of this type obey the schema defined in RFC-7807 (Problem Details for HTTP APIs).

Properties

type

swift
public let type: ProblemType

metadata

swift
public let metadata: Metadata?

An optional object with additional information about the response. A client may ignore the information present in this object.

title

swift
public let title: Message?

An optional Message that represents the title of the problem.

messages

swift
public let messages: [UserMessage]

An optional array of UserMessage that represents the messages that should be displayed to users to help them understand the context of an interaction.

links

swift
public let links: [Link]

An array of Link that represents the links that may be used to offer an user alternative flows.

Methods

==(::)

swift
public static func == (lhs: Problem, rhs: Problem) -> Bool

Parameters

Name Description
lhs A value to compare.
rhs Another value to compare.

init(from:)

swift
public required init(from decoder: Decoder) throws

Parameters

Name Description
decoder The decoder to read data from.