fix error message rendering failing due to message being a dict