Resource group faraday#377
Open
bilal-naeem-confiz wants to merge 6 commits intofog:rest-api-migrationfrom
bilal-naeem-confiz:resource-group-faraday
Open
Resource group faraday#377bilal-naeem-confiz wants to merge 6 commits intofog:rest-api-migrationfrom bilal-naeem-confiz:resource-group-faraday
bilal-naeem-confiz wants to merge 6 commits intofog:rest-api-migrationfrom
bilal-naeem-confiz:resource-group-faraday
Conversation
houndci-bot
reviewed
Mar 14, 2018
| url, | ||
| @token | ||
| ) | ||
| rescue => e |
There was a problem hiding this comment.
Avoid rescuing without specifying an error class.
| end | ||
|
|
||
| def create_resource_group_body(location, tags) | ||
| parameters = { |
There was a problem hiding this comment.
Useless assignment to variable - parameters.
| resource_group | ||
| end | ||
|
|
||
| def create_resource_group_body(location, tags) |
There was a problem hiding this comment.
Unused method argument - tags. If it's necessary, use _ or _tags as an argument name to indicate that it won't be used.
| @token, | ||
| body | ||
| ) | ||
| rescue => e |
There was a problem hiding this comment.
Avoid rescuing without specifying an error class.
| rescue MsRestAzure::AzureOperationError => e | ||
| raise_azure_exception(e, msg) | ||
| response = Fog::AzureRM::NetworkAdapter.get(url, @token) | ||
| rescue => e |
There was a problem hiding this comment.
Avoid rescuing without specifying an error class.
| send_request(url, token, nil, DELETE_METHOD) | ||
| end | ||
|
|
||
| private |
| end | ||
| end | ||
| end | ||
| end No newline at end of file |
|
|
||
| def to_s | ||
| exception = {} | ||
|
|
| STATUS_CODES = { | ||
| success: [200, 201, 202, 203, 204], | ||
| failure: [400, 401, 402, 403, 404, 500, 501, 502, 503] | ||
| } No newline at end of file |
| SUCCESS = 'success'.freeze | ||
| FAILURE = 'failure'.freeze | ||
|
|
||
| STATUS_CODES = { |
There was a problem hiding this comment.
Freeze mutable objects assigned to constants.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Faraday Network Adapter with Custom Exception