From 4a1c37540658a82e4c5f697d46f7c63ef8dc05e8 Mon Sep 17 00:00:00 2001
From: Sergey Matveev <stargrave@stargrave.org>
Date: Mon, 28 Dec 2020 14:08:21 +0300
Subject: [PATCH] Print response when failed

---
 main.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main.go b/main.go
index d878296..b52d52a 100644
--- a/main.go
+++ b/main.go
@@ -44,8 +44,9 @@ func main() {
 
 	Client := model.NewAPIv4Client("https://" + machine)
 	Client.Login(login, password)
-	info, _ := Client.GetFileInfo(fileId)
+	info, resp := Client.GetFileInfo(fileId)
 	if info == nil {
+		fmt.Fprintln(os.Stderr, resp)
 		os.Exit(1)
 	}
 	filename := info.Name
-- 
2.51.0