Skip to main content

WarningViewModel

A warning that points to a potential issue. This is not a critical error, but may require attention to get the desired response.

Properties

Property Type Required Description
message string true

The warning message.

path string false

The path to the property on the request that the warning relates to. May be omitted or be empty if no specific property of the request relates to the warning (it is a ‘global’ warning).

code string true

The warning’s machine-readable code. Can be used for further processing of the warning before presenting to users.

detail any false

Additional detail about the warning that can be used to provide more context to users. May be omitted if there is none.

Example schema

{
  "message": "There are no results.",
  "path": "results",
  "code": "NoResults",
  "detail": {
    "total": 0
  }
}