this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

name close reasons

+20 -2
+20 -2
client/src/lumina_client.gleam
··· 380 380 } 381 381 lustre_websocket.OnBinaryMessage(msg) -> { 382 382 console.warn( 383 - "Received unexpected:" <> premixed.text_cyan(string.inspect(msg)), 383 + "Received unexpected: " <> premixed.text_cyan(string.inspect(msg)), 384 384 ) 385 385 // Ignore this. We don't expect binary messages, as we cannot tag them with how the decoder works right now. We only expect text messages, with base64-encoded bitarrays in their fields if so needed. 386 386 // So, continue with the model as is: ··· 388 388 } 389 389 lustre_websocket.OnClose(reason) -> { 390 390 console.warn( 391 - "Given close reason:" <> premixed.text_cyan(string.inspect(reason)), 391 + "Given close reason: " 392 + <> premixed.text_cyan({ 393 + case reason { 394 + lustre_websocket.AbnormalClose -> "Abnormal close" 395 + lustre_websocket.FailedExtensionNegotation -> 396 + "Failed extension negotation" 397 + lustre_websocket.FailedTLSHandshake -> "Failed TLS handshake" 398 + lustre_websocket.GoingAway -> "Going away" 399 + lustre_websocket.IncomprehensibleFrame -> "Incomprehensible frame" 400 + lustre_websocket.MessageTooBig -> "Message was too big" 401 + lustre_websocket.NoCodeFromServer -> "No code from server" 402 + lustre_websocket.Normal -> "Normal close" 403 + lustre_websocket.OtherCloseReason -> "Other close reason (unknown)" 404 + lustre_websocket.PolicyViolated -> "Policy violation" 405 + lustre_websocket.ProtocolError -> "Protocol error" 406 + lustre_websocket.UnexpectedFailure -> "Unexpected faillure" 407 + lustre_websocket.UnexpectedTypeOfData -> "Unexpected type of data" 408 + } 409 + }), 392 410 ) 393 411 #(Model(..model_, ws: Some(None)), effect.none()) 394 412 }