""" The structure for an error object returned by the API for E_* and F_* errors

When the API reports a failure, it is not just a string: it is an object with structured information
about that error.

Every error has a name, such as "E_AUTH_REQUIRED" or "F_UNEXPECTED_ERROR".

Errors have distinction between user errors and technical errors.
* A user error name starts with `E_` and means that the user can do something about it.
Blame the user or the client application for this error.
* A technical error name starts with `F_` and means that the user cannot fix it.
Blame the server for the error.
"""
type ErrorObject {
    """ Error class name.

    Use it in your code to handle different error conditions.

    Examples: E_AUTH_REQUIRED, F_UNEXPECTED_ERROR
    """
    name: String!

    """ A generic descriptive message, common to the error class.

    This message is not too informative: can be used as a caption, but not as description.
    """
    title: String!

    """ HTTP error code """
    httpcode: Int!

    """ Error message for the user

    The negative side: what went wrong
    """
    error: String!

    """ Suggested action for the user

    The positive side: what the user is supposed to do
    """
    fixit: String!

    """ Additional information

    Structured information about the error. It differs from one error to another, but in general,
    if provides the same information that the error message has, but in structured format.

    Example:

    E_NOT_FOUND:
    error: 'Cannot find User by id'
    fixit: 'Have you entered the correct id?'
    info:
    object: 'User'
    """
    info: Object!

    """ Additional debug information for developers.

    Only available in non-production mode
    """
    debug: Object
}
