JSON format added for errors as opposed to plain text.