You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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'.
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.
The text was updated successfully, but these errors were encountered: