Skip to content

Bug: invoke panics with invalid return type when I expect a return type of Vec<u8> for Bytes #59

@krisbitney

Description

@krisbitney

I expect a return type of Bytes, but invoke panics when using Vec<u8>. It is unclear what the return type should be.

let response = client.invoke::<Vec<u8>>(
        &uri,
        "bytesMethod",
        Some(&msgpack!({
            "arg": {
                "prop": "Argument Value".as_bytes().to_vec(),
            },
        })),
        None,
        None
    ).unwrap();
---- bytes_test_case stdout ----
URIS: []
thread 'bytes_test_case' panicked at 'called `Result::unwrap()` on an `Err` value: InvokeError("Failed to decode result: `invalid type: byte array, expected a sequence`")', packages/client/tests/tests-type-cases.rs:250:7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions