src/Foxy/FoxyClient/FoxyClient.php
public function getErrors($data)
    {
        $errors = array();
        if ($this->getLastStatusCode() >= 400) {
            if (isset($data['error_description'])) {
                $errors[] = $data['error_description'];
            } elseif (isset($data['_embedded']['fx:errors'])) {
                foreach ($data['_embedded']['fx:errors'] as $error) {
                    $errors[] = $error['message'];
                }
            } else {
                $errors[] = 'No data returned.';
            }
        }
        return $errors;
    }
public function getErrors($data)
    {
        $errors = array();
        if ($this->getLastStatusCode() >= 400) {
            if (isset($data['error_description'])) {
                $errors[] = $data['error_description'];
            } elseif (isset($data['_embedded']['fx:errors'])) {
                foreach ($data['_embedded']['fx:errors'] as $error) {
                    $errors[] = $error['message'];
                }
            } else {
                $errors[] = 'No data returned.';
            }
        }
        return $errors;
    }
public function getErrors ( $ data ) { $ errors = array ( ) ; if ( $ this -> getLastStatusCode ( ) >= 400 ) { if ( isset ( $ data [ 'error_description' ] ) ) { $ errors [ ] = $ data [ 'error_description' ] ; } elseif ( isset ( $ data [ '_embedded' ] [ 'fx:errors' ] ) ) { foreach ( $ data [ '_embedded' ] [ 'fx:errors' ] as $ error ) { $ errors [ ] = $ error [ 'message' ] ; } } else { $ errors [ ] = 'No data returned.' ; } } return $ errors ; }
Return any errors that exist in the response data.
Return any errors that exist in the response data .