bbernhard/signal-cli-rest-api

Error message for invalid WebSocket URL

Opened this issue · 0 comments

Feature Request

First, thanks for building this app. Very nice REST API design, too.

I just finished writing a WebSocket client to connect to /v1/receive/{number} to have a bot respond to messages.
After I finished it I put it in a shell script and mistyped the phone number to pass into the WebSocket endpoint. The mistyped number is not registered with signal-cli-rest-api or even as a Signal account, but the WebSocket connection was established normally. I was very confused when I stopped getting messages delivered on the web socket.

I think it would be great if the server could refuse the connection if the number is invalid, or if that isn't possible, maybe send a ping message with an error description. That might save someone else some headache if they also type a phone number incorrectly.