ErrorInfoBuilder
public class ErrorInfoBuilder
A helper class to build the ErrorInfo
instance.
-
Initializes ErrorInfoBuilder
Declaration
Swift
public init(type: String, message: String)
Parameters
type
The Type of error that occurred.
message
The Field Name is especially interesting when there is a validation error/issue in combination with error_type = FORM
-
Sets FieldName
Declaration
Swift
public func fieldName(_ fieldName: String) -> ErrorInfoBuilder
Parameters
fieldName
The Field Name is especially interesting when there is a validation error/issue in combination with error_type = FORM or when an API error occurs in relation to a field, error_type = API
Return Value
ErrorInfoBuilder
-
Sets Code
Declaration
Swift
public func code(_ code: String) -> ErrorInfoBuilder
Parameters
code
The Error Code is the type of error that occurred
Return Value
ErrorInfoBuilder
-
Builds a new instance of the
ErrorInfo
.Declaration
Swift
public func build() -> ErrorInfo
Return Value
a new instance of the
ErrorInfo
.