|
|
|
@ -10,7 +10,15 @@ module AliyunVod::Service::Base
|
|
|
|
|
|
|
|
|
|
Rails.logger.info("[AliyunVod] response => status: #{response.status}, result: #{result}")
|
|
|
|
|
|
|
|
|
|
raise AliyunVod::Error, result['Code'] if response.status != 200
|
|
|
|
|
if response.status != 200
|
|
|
|
|
message =
|
|
|
|
|
case result['Code']
|
|
|
|
|
when 'InvalidFileName.Extension' then '不支持的文件格式'
|
|
|
|
|
when 'IllegalCharacters' then '文件名称包含非法字符'
|
|
|
|
|
else raise AliyunVod::Error, result['Message']
|
|
|
|
|
end
|
|
|
|
|
raise AliyunVod::Error, message if message.present?
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
result
|
|
|
|
|
rescue => ex
|
|
|
|
|