deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 2/2] Core: Fixed format of reported 403 error
Date Fri, 11 Jan 2013 10:40:51 GMT
From: Michal Fojtik <mfojtik@redhat.com>

Since we now report 403 errors property (with response body),
client need to collect more informations to properly report
the errors.

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/views/errors/403.xml.haml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/server/views/errors/403.xml.haml b/server/views/errors/403.xml.haml
index 3bad335..4b4cf23 100644
--- a/server/views/errors/403.xml.haml
+++ b/server/views/errors/403.xml.haml
@@ -1,2 +1,8 @@
 %error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
+  %backend{ :driver => driver_symbol, :provider => "#{Thread::current[:provider] ||
ENV['API_PROVIDER'] || 'default'}" }
+  %backtrace=cdata(@error.backtrace.join("\n"))
+  - if params
+    %request
+      - params.each do |k, v|
+        %param{ :name => k}=v
   %message Method not allowed for this resource
-- 
1.8.0.2


Mime
View raw message