Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Add protocol 3 #10

Closed
wants to merge 3 commits into from
Closed

Add protocol 3 #10

wants to merge 3 commits into from

Conversation

privorotskii
Copy link
Contributor

@privorotskii privorotskii commented May 9, 2020

I've made a draft for #9, but there are several questions:

  1. UnauthorizedError is currently sent as ['unauthorized', message], is it needed to be sent with meta.id too, as ['unauthorized', meta.id, message]?
  2. UnknownActionError or UnknownChannelError are now ['unknownChannel', meta.id]. Should it be unified to ['unknownChannel', meta.id, stack]?
  3. This question may be silly, but how is it supposed to answer with a 500 HTTP code, while it communicates via WebSockets and not HTTP? Should the 500 code be placed in the answer's body somehow?

@ai
Copy link
Member

ai commented May 9, 2020

['unauthorized', message]

There is no unauthorized answer in Logux Back-end Protocol.

If Rails developer didn’t provide auth callback, the Rails app should throw an error during the start.

['unknownChannel', meta.id, stack]

You do not need stack for an unknown channel. It is not an error. You just do not have a processor for the channel name. You do not need a stack.

This question may be silly, but how is it supposed to answer with a 500 HTTP code, while it communicates via WebSockets and not HTTP?

Logux Back-end Protocol (HTTP-protocol between Logux Server and Rails server) doesn’t use HTTP statuses because of patching. Logux Server send many different actions to the Rails and HTTP statuses will not work if you have an error in one action and successfuly processed other actions.

@privorotskii privorotskii deleted the issue_9/add_protocol_3 branch August 18, 2020 07:43
@anaumov anaumov mentioned this pull request Sep 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants