Adds a wrapper around abort function to add JSON Content-Type.