lib/ding_sdk/otp.rb in ding_sdk-0.8.21 vs lib/ding_sdk/otp.rb in ding_sdk-0.8.22
- old
+ new
@@ -51,12 +51,11 @@
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::CreateCheckResponse)
res.create_check_response = out
end
- else
-
+ elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
res.error_response = out
end
end
@@ -96,12 +95,11 @@
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::CreateAuthenticationResponse)
res.create_authentication_response = out
end
- else
-
+ elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
res.error_response = out
end
end
@@ -141,12 +139,11 @@
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::FeedbackResponse)
res.feedback_response = out
end
- else
-
+ elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
res.error_response = out
end
end
@@ -186,12 +183,11 @@
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::AuthenticationStatusResponse)
res.authentication_status_response = out
end
- else
-
+ elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
res.error_response = out
end
end
@@ -231,11 +227,10 @@
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::RetryAuthenticationResponse)
res.retry_authentication_response = out
end
- else
-
+ elsif r.status == 400
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
res.error_response = out
end
end