beekeeper | Error while passing protocl to notification_endpoint
Calling create_session with protocol name in notifications_endpoint
is causing an error:
Ok.
curl -s --data '{
"jsonrpc": "2.0",
"method": "beekeeper_api.create_session",
"params": {
"salt": "avocado",
"notifications_endpoint": "127.0.0.1:8001"
},
"id": 1
}' http://127.0.0.1:6666 | jq
{
"jsonrpc": "2.0",
"result": {
"token": "5afd978be24eda9e2dc5dc78fd69db76381902b3827f42e88dd90d0e8b26af03"
},
"id": 1
}
Error:
(default) $ curl curl -s --data '{
"jsonrpc": "2.0",
"method": "beekeeper_api.create_session",
"params": {
"salt": "avocado",
"notifications_endpoint": "http://127.0.0.1:8001"
},
"id": 1
}' http://127.0.0.1:6666 | jq
{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "unspecified:Bad port: //127.0.0.1:8001",
"data": {
"code": 0,
"name": "exception",
"message": "unspecified",
"stack": [
{
"context": {
"level": "error",
"file": "resolve.cpp",
"line": 47,
"method": "resolve_string_to_ip_endpoints",
"hostname": "",
"timestamp": "2023-11-13T09:47:56"
},
"format": "Bad port: ${port}",
"data": {
"port": "//127.0.0.1:8001"
}
},
{
"context": {
"level": "warn",
"file": "resolve.cpp",
"line": 50,
"method": "resolve_string_to_ip_endpoints",
"hostname": "",
"timestamp": "2023-11-13T09:47:56"
},
"format": "",
"data": {
"endpoint_string": "http://127.0.0.1:8001"
}
}
],
"extension": {}
}
},
"id": 1
}
We should allow to pass protocol name.