better error reporting on publish
authorJan Szejko <janek37@gmail.com>
Mon, 16 Oct 2017 09:31:11 +0000 (11:31 +0200)
committerJan Szejko <janek37@gmail.com>
Mon, 16 Oct 2017 09:31:11 +0000 (11:31 +0200)
apps/catalogue/views.py

index e6f6cca..3d1a47f 100644 (file)
@@ -571,7 +571,7 @@ def publish(request, slug):
     except NotAuthorizedError:
         return http.HttpResponseRedirect(reverse('apiclient_oauth'))
     except BaseException, e:
     except NotAuthorizedError:
         return http.HttpResponseRedirect(reverse('apiclient_oauth'))
     except BaseException, e:
-        return http.HttpResponse(e)
+        return http.HttpResponse(repr(e))
     else:
         return http.HttpResponseRedirect(book.get_absolute_url())
 
     else:
         return http.HttpResponseRedirect(book.get_absolute_url())