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

Firehose sends empty string in t of Error Frame (op is -1) #3086

Open
MarshalX opened this issue Nov 23, 2024 · 3 comments
Open

Firehose sends empty string in t of Error Frame (op is -1) #3086

MarshalX opened this issue Nov 23, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@MarshalX
Copy link
Contributor

MarshalX commented Nov 23, 2024

Describe the bug

Hello, it is me again 😢

t is not optional in error frame. According to the docs:

t ("type", string, optional): required if op is 1, indicating the Lexicon sub-type for this message, in short form. Does not include the full Lexicon identifier, just a fragment. Eg: #commit. Should not be included in header if op is -1. (atproto.com/specs/event-stream#streaming-wire-protocol-v0)

To Reproduce

  1. Listen for firehose
  2. Wait until error frame will be sent
  3. Check the value of the frame
  4. You will see empty string for t field
{'t': '', 'op': -1}

Expected behavior

When error happens t should not be provided at all

Additional context

MarshalX/atproto#430

It is expected? Should firehose listeners be ready to ignore t for op -1 on client side?

@MarshalX MarshalX added the bug Something isn't working label Nov 23, 2024
@bnewbold
Copy link
Collaborator

Hrm, I suspect a golang bug. Shoudl maybe have "omitempty" here:

https://github.com/bluesky-social/indigo/blob/main/events/events.go#L152

@brianolson @dholms @ericvolp12

@brianolson
Copy link

Yeah, I think omitempty will do what we want.

@jaredmantell
Copy link

if i fix this will you guys give me 100 thousan dollars a year and a job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants