Home Reference Source Test

Typedef

Static Public Summary
public

api-callback(errors: Object[], data: Object, res: Object): function

The callback interface for api calls

Static Public

public api-callback(errors: Object[], data: Object, res: Object): function source

The callback interface for api calls

Params:

NameTypeAttributeDescription
errors Object[]
  • optional

In case of an error an array with error objects otherwise undefined

errors[].fieldName string
  • optional

The field name (if error is caused by a particular field)

errors[].message string

The error message

errors[].code string

The error code

data Object

The rest response body

res Object

The raw superagent response object