ErrorInfoBuilder
public class ErrorInfoBuilder
A helper class to build the ErrorInfo instance.
-
Initializes ErrorInfoBuilder
Declaration
Swift
public init(type: String, message: String)Parameters
typeThe Type of error that occurred.
messageThe 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) -> ErrorInfoBuilderParameters
fieldNameThe 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) -> ErrorInfoBuilderParameters
codeThe Error Code is the type of error that occurred
Return Value
ErrorInfoBuilder
-
Builds a new instance of the
ErrorInfo.Declaration
Swift
public func build() -> ErrorInfoReturn Value
a new instance of the
ErrorInfo.
View on GitHub