error message is now in JSON format