OpenVeo Core server

API Docs for: 7.0.0
Show:

ErrorController

Extends Controller
Module: core-controllers

Summary

Defines a controller to handle errors.

Constructor

ErrorController

Syntax

ErrorController

()

Summary

Methods

errorAction

Syntax

errorAction

(
  • error
  • request
  • response
  • next
)

Summary

Handles all errors.

Parameters:

  • error Object

    An error object

    • httCode Number

      The code HTTP to return for this error

    • message Number

      The message with the error

    • [code=UNKNOWN_ERROR] Number optional

      The error code

    • [module=core] Number optional

      The name of the plugin the error belongs to

  • request Request

    ExpressJS HTTP Request

  • response Response

    ExpressJS HTTP Response

  • next Function

    Function to defer execution to the next registered middleware

notFoundAction

Syntax

notFoundAction

(
  • request
  • response
  • next
)

Summary

Handles requests which does not correspond to anything.

Parameters:

  • request Request

    ExpressJS HTTP Request

  • response Response

    ExpressJS HTTP Response

  • next Function

    Function to defer execution to the next registered middleware

notFoundPageAction

Syntax

notFoundPageAction

(
  • request
  • response
)

Summary

Handles forgotten requests.

Depending on request Accept HTTP header, either an HTML content, a JSON content or a text content will be returned with a 404 code.

Parameters: