static methods added to easily send JSON error message