DistelliServiceFrameworkRails 1.1 → 1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/distelli/serviceframeworkrails.rb +6 -3
- metadata +2 -2
@@ -68,7 +68,8 @@ module DistelliServiceFrameworkRails
|
|
68
68
|
elsif response_type == Distelli::ServiceConstants::RESPONSE_TYPE_XML
|
69
69
|
return response_type
|
70
70
|
else
|
71
|
-
|
71
|
+
log = Logging::Logger['DistelliFramework']
|
72
|
+
log.error("Invalid response type: "+response_type+" Defaulting to "+ServiceConstants::RESPONSE_TYPE_JSON)
|
72
73
|
return Distelli::ServiceConstants::RESPONSE_TYPE_JSON
|
73
74
|
end
|
74
75
|
end
|
@@ -116,7 +117,8 @@ module DistelliServiceFrameworkRails
|
|
116
117
|
if error.is_a?(Distelli::BaseException)
|
117
118
|
response.status = error.http_code
|
118
119
|
else
|
119
|
-
|
120
|
+
log = Logging::Logger['DistelliFramework']
|
121
|
+
log.error("Unhandled Exception: "+error.message+" "+error.backtrace.join(" \n"))
|
120
122
|
error = Distelli::ServerError.new("Cannot marshall error of type "+error.class.name+" Defaulting to ServerError")
|
121
123
|
response.status = error.http_code
|
122
124
|
end
|
@@ -134,7 +136,8 @@ module DistelliServiceFrameworkRails
|
|
134
136
|
response.headers.update(headers_hash)
|
135
137
|
self.response_body = $xml_marshaller.marshall_error(error)
|
136
138
|
else
|
137
|
-
|
139
|
+
log = Logging::Logger['DistelliFramework']
|
140
|
+
log.error("Invalid Response Type: "+response_type)
|
138
141
|
error = ServerError.new("Invalid response type: "+response_type)
|
139
142
|
response.status = error.http_code
|
140
143
|
headers_hash[Distelli::ServiceConstants::CONTENT_TYPE_HEADER] = Distelli::ServiceConstants::CONTENT_TYPE_JSON
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: DistelliServiceFrameworkRails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.2'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|