328
329
switch response.StatusCode {
331
>
info, err := operationInfoFromResponse(response, body)
332
>
if err != nil {
333
return nil, err
334
}
335
>
if info.State != nexus.OperationStateRunning {
client.go
336
return nil, newUnexpectedResponseError(fmt.Sprintf("invalid operation state in response info: %q", info.State), response, body)
337
}
338
>
handle, err := c.NewOperationHandle(operation, info.Token)
client.go
339
>
if err != nil {
340
return nil, newUnexpectedResponseError("empty operation token in response", response, body)
341
}
342
>
return &ClientStartOperationResponse[*nexus.LazyValue]{
client.go
343
>
Pending: handle,
344
>
Links: links,
345
>
}, nil
346
case statusOperationUnsuccessful:
347
failure, err := c.failureFromResponse(response, body)