From 77ced39e6c02cd375ac6df0c00f78846ac5cbec5 Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Fri, 31 Jan 2014 12:26:45 -0500 Subject: [PATCH] Fix doc for custom exception sample The way to provide a default detail for APIException is to define a `default_detail` attribute on the subclass. Defining a `detail` attribute without `default_detail` will not work, and will result in empty detail instead. --- docs/api-guide/exceptions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md index 221df679d..4e8b823ce 100644 --- a/docs/api-guide/exceptions.md +++ b/docs/api-guide/exceptions.md @@ -94,7 +94,7 @@ For example, if your API relies on a third party service that may sometimes be u class ServiceUnavailable(APIException): status_code = 503 - detail = 'Service temporarily unavailable, try again later.' + default_detail = 'Service temporarily unavailable, try again later.' ## ParseError