set response mimeType on error