-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The route block that handles listing all cloud accounts has a logic issue. It attempt to do some input parameter validation and supposed to return an error condition if required params are not found but this logic falls through to happy path logic every time because there is no use of 'halt'.
if params[:org_id].nil?
message = Error.new.extend(ErrorRepresenter)
message.message = "Must provide org_id with request for cloud accounts."
[BAD_REQUEST, message.to_json]
elsif params[:account_id].nil?
message = Error.new.extend(ErrorRepresenter)
message.message = "Must provide account_id with request for cloud accounts."
[BAD_REQUEST, message.to_json]
end
In a few other route blocks in this class, a return call is used in this case instead of a halt. All should be addressed.
Metadata
Metadata
Assignees
Labels
No labels