rabbit_mgmt_util:internal_server_error/4 expects an atom or binary and a string formattable term (~ts) as arguments but rabbit_mgmt_wm_vhost passes charlists and any term. This can cause a log formatter crash and an unexpected message in the management UI when attempting to add a vhost while a cluster is in a minority with Khepri enabled for example.
We can pass atoms for the Error parameter and binaries or strings for the Reason parameter to fix both issues.
This is an automatic backport of pull request #11585 done by Mergify.
rabbit_mgmt_util:internal_server_error/4
expects an atom or binary and a string formattable term (~ts
) as arguments butrabbit_mgmt_wm_vhost
passes charlists and any term. This can cause a log formatter crash and an unexpected message in the management UI when attempting to add a vhost while a cluster is in a minority with Khepri enabled for example.We can pass atoms for the
Error
parameter and binaries or strings for theReason
parameter to fix both issues.This is an automatic backport of pull request #11585 done by Mergify.