public function prettyPrint()
    {
        print($this->ecode . " (" . $this->getHttpStatus() . "): " .
            $this->getMessage() . "\n");
        if (!empty($this->errors)) {
            print("Field errors:\n");
            foreach($this->errors as $field_error) {
                foreach($field_error as $k => $v) {
                    print("  " . $k . ": " . $v . "\n");
                }
                print("\n");
            }
        }
    }