Skip to content

Return friendly error if input is Base64 encoded #630

Description

@lavaleri

Problem:

We have some code that intends to return a friendly error if the first byte is base64 encoded:

However we can't ever get inside those statements because we first do a check at:

needs(deserializer, 'Not a supported message format version.')

Solution:

Move the logic checking the expected first byte in Base64 before the branch that determines which version we're deserializing.

Out of scope:

n/a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions