Skip to content

InjectionOperation fails to parse failure result #178

Description

@utdrmac

Here's the actual result when attempting manually:

curl --verbose -H "content-type: application/json" -X POST --data '"03d7b1a..."' http://127.0.0.1:18732/injection/operation
...
* upload completely sent off: 320 out of 320 bytes
< HTTP/1.1 500 Internal Server Error
< content-length: 106
< content-type: application/json
<
[{"kind":"temporary","id":"failure","msg":"Unknown branch (BKjyVHcJu9yE), cannot inject the operation."}]

When attempting to use client.InjectionOperation(), json.Unmarshal assumes result is string and decode fails

var opstring string

json: cannot unmarshal array into Go value of type string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions