@@ -142,8 +142,7 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) {
142
142
_ , ocmderr , err := statRef (ctx , provider.Reference {Path : r .URL .Query ().Get ("container" )}, client )
143
143
if err != nil {
144
144
log .Error ().Err (err ).Msg ("error statting container" )
145
- ocmd .WriteError (w , r , ocmderr , "Container not found" ,
146
- errtypes .NotFound ("Container not found" ))
145
+ ocmd .WriteError (w , r , ocmderr , "Container not found" , errtypes .NotFound ("Container not found" ))
147
146
return
148
147
}
149
148
// Create empty file via storageprovider: obtain the HTTP URL for a PUT
@@ -201,8 +200,7 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) {
201
200
statRes , ocmderr , err := statRef (ctx , provider.Reference {Path : target }, client )
202
201
if err != nil {
203
202
log .Error ().Err (err ).Msg ("error statting created file" )
204
- ocmd .WriteError (w , r , ocmderr , "Created file not found" ,
205
- errtypes .NotFound ("Created file not found" ))
203
+ ocmd .WriteError (w , r , ocmderr , "Created file not found" , errtypes .NotFound ("Created file not found" ))
206
204
return
207
205
}
208
206
js , err := json .Marshal (map [string ]interface {}{"file_id" : statRes .Id })
@@ -232,7 +230,8 @@ func (s *svc) handleList(w http.ResponseWriter, r *http.Request) {
232
230
return
233
231
}
234
232
if listRes .Status .Code != rpc .Code_CODE_OK {
235
- ocmd .WriteError (w , r , ocmd .APIErrorServerError , "error listing supported mime types" , status .NewErrorFromCode (listRes .Status .Code , "appprovider" ))
233
+ ocmd .WriteError (w , r , ocmd .APIErrorServerError , "error listing supported mime types" ,
234
+ status .NewErrorFromCode (listRes .Status .Code , "appprovider" ))
236
235
return
237
236
}
238
237
@@ -276,7 +275,8 @@ func (s *svc) handleOpen(w http.ResponseWriter, r *http.Request) {
276
275
return
277
276
}
278
277
if openRes .Status .Code != rpc .Code_CODE_OK {
279
- ocmd .WriteError (w , r , ocmd .APIErrorServerError , "error opening resource information" , status .NewErrorFromCode (openRes .Status .Code , "appprovider" ))
278
+ ocmd .WriteError (w , r , ocmd .APIErrorServerError , "error opening resource information" ,
279
+ status .NewErrorFromCode (openRes .Status .Code , "appprovider" ))
280
280
return
281
281
}
282
282
0 commit comments