@@ -85,7 +85,7 @@ func newKibanaSavedObjectGetFunc(c *resty.Client) KibanaSavedObjectGet {
8585 if resp .StatusCode () == 404 {
8686 return nil , nil
8787 }
88- return nil , NewAPIError (resp .StatusCode (), resp .Status ())
88+ return nil , NewAPIError (resp .StatusCode (), "%s" , resp .Status ())
8989
9090 }
9191 var data map [string ]interface {}
@@ -165,7 +165,7 @@ func newKibanaSavedObjectFindFunc(c *resty.Client) KibanaSavedObjectFind {
165165 if resp .StatusCode () == 404 {
166166 return nil , nil
167167 }
168- return nil , NewAPIError (resp .StatusCode (), resp .Status ())
168+ return nil , NewAPIError (resp .StatusCode (), "%s" , resp .Status ())
169169
170170 }
171171 var data map [string ]interface {}
@@ -214,7 +214,7 @@ func newKibanaSavedObjectCreateFunc(c *resty.Client) KibanaSavedObjectCreate {
214214 }
215215 log .Debug ("Response: " , resp )
216216 if resp .StatusCode () >= 300 {
217- return nil , NewAPIError (resp .StatusCode (), resp .Status ())
217+ return nil , NewAPIError (resp .StatusCode (), "%s" , resp .Status ())
218218 }
219219 var dataResponse map [string ]interface {}
220220 err = json .Unmarshal (resp .Body (), & dataResponse )
@@ -263,7 +263,7 @@ func newKibanaSavedObjectUpdateFunc(c *resty.Client) KibanaSavedObjectUpdate {
263263 }
264264 log .Debug ("Response: " , resp )
265265 if resp .StatusCode () >= 300 {
266- return nil , NewAPIError (resp .StatusCode (), resp .Status ())
266+ return nil , NewAPIError (resp .StatusCode (), "%s" , resp .Status ())
267267 }
268268 var dataResponse map [string ]interface {}
269269 err = json .Unmarshal (resp .Body (), & dataResponse )
@@ -304,7 +304,7 @@ func newKibanaSavedObjectDeleteFunc(c *resty.Client) KibanaSavedObjectDelete {
304304 }
305305 log .Debug ("Response: " , resp )
306306 if resp .StatusCode () >= 300 {
307- return NewAPIError (resp .StatusCode (), resp .Status ())
307+ return NewAPIError (resp .StatusCode (), "%s" , resp .Status ())
308308 }
309309 var dataResponse map [string ]interface {}
310310 err = json .Unmarshal (resp .Body (), & dataResponse )
@@ -356,7 +356,7 @@ func newKibanaSavedObjectExportFunc(c *resty.Client) KibanaSavedObjectExport {
356356 }
357357 log .Debug ("Response: " , resp )
358358 if resp .StatusCode () >= 300 {
359- return nil , NewAPIError (resp .StatusCode (), resp .Status ())
359+ return nil , NewAPIError (resp .StatusCode (), "%s" , resp .Status ())
360360 }
361361
362362 data := resp .Body ()
@@ -396,7 +396,7 @@ func newKibanaSavedObjectImportFunc(c *resty.Client) KibanaSavedObjectImport {
396396 }
397397 log .Debug ("Response: " , resp )
398398 if resp .StatusCode () >= 300 {
399- return nil , NewAPIError (resp .StatusCode (), resp .Status ())
399+ return nil , NewAPIError (resp .StatusCode (), "%s" , resp .Status ())
400400 }
401401 var dataResponse map [string ]interface {}
402402 err = json .Unmarshal (resp .Body (), & dataResponse )
0 commit comments