typhonius/acquia_cli

Error checking when dbName doesn't exist in `acquiacli db:backup:download`

Closed this issue · 0 comments

Just putting this here to make things a little bit better, not trying to nit pic :)

Is your feature request related to a problem? Please describe.
When I had a typo in the dbName parameter in the db:backup:download command I just recieved some PHP notice and an error saying a resource didn't exist.

Describe the solution you'd like
Lets throw an error if $backup is an empty arrayobject. Dumping it on line 182 gave me

object(AcquiaCloudApi\Response\BackupsResponse)#595 (1) {
  ["storage":"ArrayObject":private]=>
  array(0) {
  }
}

because the query before returned 0 results.

Additional context
Add any other context or screenshots about the feature request here.
image