Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API parse errors #42

Open
sgrimee opened this issue Nov 13, 2023 · 6 comments
Open

API parse errors #42

sgrimee opened this issue Nov 13, 2023 · 6 comments

Comments

@sgrimee
Copy link
Contributor

sgrimee commented Nov 13, 2023

Using this issue to collect API deserialization errors due to missing fields.

  • The field url in the Activity struct is not always sent by the API, causing a parse error on occasion.
    This can be seen for example when receiving a Meeting event on meeting closure.

  • The field global_id can be missing to build a Target struct. This was seen when receiving a delete (?) activity

These are minor as long as the crate does not support the associated event types, but it would be cleaner to make the fields optional.

@sgrimee sgrimee changed the title Parse error, missing url field Parse error, missing field Nov 14, 2023
@sgrimee
Copy link
Contributor Author

sgrimee commented Dec 12, 2023

global_id was made optional in Target in commit 4b701de

sgrimee pushed a commit to sgrimee/webex-rust that referenced this issue Dec 15, 2023
@sgrimee
Copy link
Contributor Author

sgrimee commented Dec 15, 2023

participants and activities now optional in Target in commit efd4935

@sgrimee sgrimee changed the title Parse error, missing field API parse errors Dec 21, 2023
@sgrimee
Copy link
Contributor Author

sgrimee commented Dec 21, 2023

seen with AdaptativeCards

Msg(
        "Failed to list webex::types::Message",
    ),
    State {
        next_error: Some(
            Error(
                Msg(
                    "failed to parse reply",
                ),
                State {
                    next_error: Some(
                        Error("unknown variant `stretch`, expected `Auto` or `Stretch`", line: 1, column: 924),
                    ),
                    backtrace: InternalBacktrace {
                        backtrace: None,
                    },
...

@sgrimee
Copy link
Contributor Author

sgrimee commented Dec 21, 2023

seen with AdaptativeCards

    Msg(
        "Failed to list webex::types::Message",
...
                        Error("missing field `items`", line: 1, column: 795),

sgrimee pushed a commit to sgrimee/webex-rust that referenced this issue Dec 21, 2023
@sgrimee
Copy link
Contributor Author

sgrimee commented Dec 21, 2023

                    Error("missing field `items`", line: 1, column: 795),

fixed in d944c31

@sgrimee
Copy link
Contributor Author

sgrimee commented Dec 21, 2023

                    Error("unknown variant `stretch`, expected `Auto` or `Stretch`", line: 1, column: 924),

fixed in 8df385a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant