User may use old client. We need to handle this case and instead of server error (because of old protocol) show the proper message to update client.
To do it we use “Subprotocol”, client-server API version. We use it in Logux. Logux clients send their version in all actions. Logux Server has a range of supported versions.
User may use old client. We need to handle this case and instead of server error (because of old protocol) show the proper message to update client.
To do it we use “Subprotocol”, client-server API version. We use it in Logux. Logux clients send their version in all actions. Logux Server has a range of supported versions.
We need to add the same logic to HTTP API:
X-Subprotocol
header tofetchJSON()
helperjsonApi()
and respond a proper error message on it.Update client
route to thecore/
router. You may need boolean store and add logic tocompute
in the router.Update client
to the web client with simple design. See How create a page.true
in case of Logux error orfetchJSON
error, which ask to update the client.