From ed93e13a1c6f792e14176bdaa5e96d0fa2c63a2f Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 1 Dec 2014 12:20:07 +0000 Subject: Update documentation --- api-guide/exceptions/index.html | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'api-guide/exceptions/index.html') diff --git a/api-guide/exceptions/index.html b/api-guide/exceptions/index.html index 30939688..70c51cac 100644 --- a/api-guide/exceptions/index.html +++ b/api-guide/exceptions/index.html @@ -164,6 +164,10 @@ Serializer relations +
  • + Validators +
  • +
  • Authentication
  • @@ -263,6 +267,10 @@ 2.4 Announcement +
  • + 3.0 Announcement +
  • +
  • Kickstarter Announcement
  • @@ -389,6 +397,10 @@ Throttled +
  • + ValidationError +
  • + @@ -484,7 +496,7 @@ class ServiceUnavailable(APIException):

    ParseError

    Signature: ParseError(detail=None)

    -

    Raised if the request contains malformed data when accessing request.DATA or request.FILES.

    +

    Raised if the request contains malformed data when accessing request.data.

    By default this exception results in a response with the HTTP status code "400 Bad Request".

    AuthenticationFailed

    Signature: AuthenticationFailed(detail=None)

    @@ -504,12 +516,25 @@ class ServiceUnavailable(APIException):

    By default this exception results in a response with the HTTP status code "405 Method Not Allowed".

    UnsupportedMediaType

    Signature: UnsupportedMediaType(media_type, detail=None)

    -

    Raised if there are no parsers that can handle the content type of the request data when accessing request.DATA or request.FILES.

    +

    Raised if there are no parsers that can handle the content type of the request data when accessing request.data.

    By default this exception results in a response with the HTTP status code "415 Unsupported Media Type".

    Throttled

    Signature: Throttled(wait=None, detail=None)

    Raised when an incoming request fails the throttling checks.

    By default this exception results in a response with the HTTP status code "429 Too Many Requests".

    +

    ValidationError

    +

    Signature: ValidationError(detail)

    +

    The ValidationError exception is slightly different from the other APIException classes:

    + +

    The ValidationError class should be used for serializer and field validation, and by validator classes. It is also raised when calling serializer.is_valid with the raise_exception keyword argument:

    +
    serializer.is_valid(raise_exception=True)
    +
    +

    The generic views use the raise_exception=True flag, which means that you can override the style of validation error responses globally in your API. To do so, use a custom exception handler, as described above.

    +

    By default this exception results in a response with the HTTP status code "400 Bad Request".

    @@ -524,7 +549,7 @@ class ServiceUnavailable(APIException): -- cgit v1.2.3