Can't find error details when post assignments api fails

I’m using the POST assignments API to test uploading (creating) new assignments. It works correctly, but when I supply a bad userid or bad pre-fill data, I get the 400 status_code indicating it has failed, but I can’t find any details about the reason for the failure. My workaround has been to upload the data manually in order to see the relevant error messages. Are these details returned by the API, and if so, where? I’m using R. The POST statement is this:
test_post<-httr::POST(url = base_url,
accept_json(),
add_headers(charset=“utf-8”),
auth,
body=js_ch,
encode = “json”,
httr::write_disk(aJsonFile, overwrite = T))
httr::stop_for_status(test_post, “create assignment: bad userids or bad data”)

Based on my reading of the API docs, there should be some error message returned in the response.

Do you see anything in the headers or the body of the response?

No. I looked in all the parts of the returned object and I couldn’t find anything.

Your question is definitely one for the development team.

That said, I’ll investigate on the R side to see if something is lost or hidden in the response object. Also, I might tinker with {httr2} an experimental successor to {httr}, in case there are some benefits there for this type of problem.

Assuming you are indeed calling the POST method for creating assignments and you made an error in the responsible login the relevant content you find in the response’s body:

Compare to the response when the query is correct and the assignment has been created:

I’d advise using an API client (written by whichever author you feel more comfortable to work with) instead of submitting low-level queries.

When you do have a problem, however, consider submitting the low-level queries like these, but please make sure that you show the content of your query, the responses you obtain and describe the version and conditions on the server.