Send an error response to API when refusing request