-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CF] improve logging and error handling #434
base: fog-arm-cf
Are you sure you want to change the base?
Conversation
add catch all to log all errors
raise_azure_exception(ex, msg) | ||
rescue => e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/RescueStandardError: Avoid rescuing without specifying an error class.
@@ -6,26 +6,36 @@ class Real | |||
def put_blob_block(container_name, blob_name, block_id, data, options = {}) | |||
my_options = options.clone | |||
my_options[:request_id] = SecureRandom.uuid | |||
|
|||
correlation_id = SecureRandom.uuid | |||
if my_options[:fog_correlation_id] != nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/NonNilCheck: Prefer !expression.nil? over expression != nil.
my_options = options.clone | ||
|
||
correlation_id = SecureRandom.uuid | ||
if my_options[:fog_correlation_id] != nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/NonNilCheck: Prefer !expression.nil? over expression != nil.
raise_azure_exception(ex, msg) | ||
rescue => e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/RescueStandardError: Avoid rescuing without specifying an error class.
msg = "Deleting blob: #{blob_name} in container #{container_name}. options: #{my_options}" | ||
|
||
correlation_id = SecureRandom.uuid | ||
if my_options[:fog_correlation_id] != nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/NonNilCheck: Prefer !expression.nil? over expression != nil.
raise_azure_exception(ex, msg) | ||
rescue => e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/RescueStandardError: Avoid rescuing without specifying an error class.
@@ -6,17 +6,23 @@ class Real | |||
def create_block_blob(container_name, blob_name, body, options = {}) | |||
my_options = options.clone | |||
my_options[:request_id] = SecureRandom.uuid | |||
|
|||
correlation_id = SecureRandom.uuid | |||
if my_options[:fog_correlation_id] != nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/NonNilCheck: Prefer !expression.nil? over expression != nil.
raise_azure_exception(ex, msg) | ||
rescue => e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/RescueStandardError: Avoid rescuing without specifying an error class.
msg = "commit_blob_blocks: Complete uploading #{blob_name} to the container #{container_name}. options: #{my_options}" | ||
|
||
correlation_id = SecureRandom.uuid | ||
if my_options[:fog_correlation_id] != nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/NonNilCheck: Prefer !expression.nil? over expression != nil.
@@ -6,16 +6,26 @@ class Real | |||
def commit_blob_blocks(container_name, blob_name, blocks, options = {}) | |||
my_options = options.clone | |||
my_options[:request_id] = SecureRandom.uuid | |||
msg = "commit_blob_blocks: Complete uploading #{blob_name} to the container #{container_name}. options: #{my_options}" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
@@ -6,26 +6,36 @@ class Real | |||
def put_blob_block(container_name, blob_name, block_id, data, options = {}) | |||
my_options = options.clone | |||
my_options[:request_id] = SecureRandom.uuid | |||
|
|||
correlation_id = SecureRandom.uuid | |||
if !my_options[:fog_correlation_id].nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/NegatedIf: Favor unless over if for negative conditions.
msg = "Deleting blob: #{blob_name} in container #{container_name}. options: #{my_options}" | ||
|
||
correlation_id = SecureRandom.uuid | ||
if !my_options[:fog_correlation_id].nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/NegatedIf: Favor unless over if for negative conditions.
@@ -6,17 +6,23 @@ class Real | |||
def create_block_blob(container_name, blob_name, body, options = {}) | |||
my_options = options.clone | |||
my_options[:request_id] = SecureRandom.uuid | |||
|
|||
correlation_id = SecureRandom.uuid | |||
if !my_options[:fog_correlation_id].nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/NegatedIf: Favor unless over if for negative conditions.
msg = "commit_blob_blocks: Complete uploading #{blob_name} to the container #{container_name}. options: #{my_options}" | ||
|
||
correlation_id = SecureRandom.uuid | ||
if !my_options[:fog_correlation_id].nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/NegatedIf: Favor unless over if for negative conditions.
Improvements: