rabbitmq-server icon indicating copy to clipboard operation
rabbitmq-server copied to clipboard

Produce better error messages for unsupported values of boolean headers

Open jegade opened this issue 8 years ago • 1 comments

I tried to persistent my messages with the persistent-Header, but instead of value=true i wrote value=1 which results in an processing error, without further information.

It would be great to support "1" or create a proper error message, like "Unsupported value for persistent-Header, please use true/false"

filter: (ip or ip6) and ( port 61613 )
####
T 172.23.0.5:44098 -> 172.23.0.4:61613 [AP]
CONNECT
passcode:guest
login:guest
 
.
##
T 172.23.0.4:61613 -> 172.23.0.5:44098 [AP]
CONNECTED
server:RabbitMQ/3.6.10
session:session-CjCUqTY2FL3AmHUkS4Lflg
heart-beat:0,0
version:1.0
 
.
 
##
T 172.23.0.5:44098 -> 172.23.0.4:61613 [AP]
SEND
destination:/queue/elastic
persistent:1
receipt:session-CjCUqTY2FL3AmHUkS4Lflg-1
 
{"hello":"World","count":1}.
#
T 172.23.0.4:61613 -> 172.23.0.5:44098 [AP]
ERROR
message:Processing error
content-type:text/plain
version:1.0,1.1,1.2
content-length:16
 
Processing error.
 
###^Cexit
15 received, 0 dropped

jegade avatar Jul 17 '17 07:07 jegade

The STOMP spec is very accommodating when it comes to header values.

I don't think supporting "1" as "true" is a good idea. Producing better messages for boolean fields sounds good.

michaelklishin avatar Jul 17 '17 08:07 michaelklishin