Refactoring error messages in heatmap

Updating the heatmap endpoint to use the constant ERROR_STR to format
it's error messages for a more consistent interface.