Skip to content

deserialize error on get_build_log response #590

@kevinschoonover

Description

@kevinschoonover

I am trying to get the logs of a build using get_build_log, but I get the following error:

hread 'main' panicked at Tools\pb\src\cmd_trigger.rs:222:34:
called `Result::unwrap()` on an `Err` value: Error { context: Full(Custom { kind: DataConversion, error: Error("expected value", line: 1, column: 1) }, "Failed to deserialize response:\n============================================================================== \r\nTask         : Pull Request Validation\r\nDescription  : OneBranch Policy Validation\r\nVersion      : 1.0.141099\r\nAuthor       : Microsoft Corporation\r\n============================================================================== \r\n

Looking at the Impl Response for get_build_log, it looks like its running serde_json -> String when the data in the log is not a json
https://github.com/microsoft/azure-devops-rust-api/blob/44af69f5df3cee2d05619af501c985885f0e702a/azure_devops_rust_api/src/build/mod.rs#L4580C13-L4593C14

Example output:

============================================================================== 
Task         : Pull Request Validation
Description  : OneBranch Policy Validation
Version      : 1.0.141099
Author       : Microsoft Corporation
============================================================================== 

It seems like there is something in the autogeneration that needs to be aware its not a json and therefore not run serde_json::from_slice on it?

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