-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check_opencpu_response()
should check for content type of API response
#300
Comments
Both So while I can replicate the OpenCPU binary response with: httr::POST(
url = "https://opencpu.lifewatch.be/library/etnservice/R/write_dwc/",
body = list(credentials = get_credentials(),
animal_project_code = "2014_demer",
directory = "."),
encode = "json"
) I can't actually replicate the no error behaviour. |
Was I getting a different error because of the 403 I was getting? (because functions needed to start with But even then the function should have returned an error with the message:
|
Currently
check_opencpu_response()
only checks for the HTTP status code, but it could also check for the content type.During #297 , I encountered a case where the content type was binary causing
extract_temp_key()
to return NA without an error.Either of these functions should have thrown an error here instead.
The API response was binary because I was passing unsupported arguments to
etnservice
via the request bodyThe text was updated successfully, but these errors were encountered: