Start a conversation

API Troubleshooting

This article lists errors that you might receive, as well as potential causes and solutions. They are also listed in the endpoints in the API documentation.

We also recommend that you try the endpoints from our documentation page directly, so that you can check whether there is something going wrong in Castor EDC or in your code specifically.

  1. Navigate to https://data.castoredc.com/api, us.castoredc.com/api, uk.castoredc.com/api or au.castoredc.com/api
  2. Click on the green Authorize button on the right. Authenticate with your user credentials that can be found in your account settings.
  3. Try out one of the endpoints. 

Error 400 Bad request

If you get this error with the endpoint

/study/{study_id}/export/data

then this means that you have user roles in your study. It is not possible to use the endpoint if your account has a user role in the study. It is not possible to delete a user role from an account, so you will need to add a different account. Alternatively, you can contact us to request to delete the user role from your account in the study.

Error 403 Forbidden

Error 403 Forbidden means you don’t have the right access to the requested data. Practically speaking it can mean that:

  • Your user credentials are not correct

  • You don’t have the appropriate rights to access the particular study/institute/phase/step, etc. It is also possible that you are blinded to parts of the CRF.

  • One of the IDs is incorrect, leading to the system trying to access something that you don’t have access to  (which probably also doesn’t exist). Note that the IDs should be uppercase (except for your own record IDs).

  • Your study is on a different server. Check if your url needs to be data.castoredc.com, uk.castoredc.com, us.castoredc.com, or au.castoredc.com.

404 Not found

This is a generic error that could mean that:

  • The record/report/anything that you're trying to access cannot be found. It is possible that it does not exist. Check if you have used the right uppercase IDs.
  • The path that you're using is not correct. Check your path with our API documentation. Also check for spelling mistakes or typos, such as double slashes.

Error 422 Unprocessable Entity

Error 422 Unprocessable Entity means that the request that you have tried to make is incorrect. The error message will contain information about what is going wrong. Please check if you are using the call properly and if you have filled in the parameters correctly. Note that field values should always be between quotation marks ("").

Error 500 Internal Server error

Error 500 Internal Server error could mean several things. One option is that the system times out because the amount of data that needs to be transferred is too large, in which case you can try to split up the request in smaller ones.  If this is not the case, you can contact us and share your code with us, so that we can look into the issue. Please be careful NOT to share your user credentials (client ID and secret) with us!

Study not found

If your study is not found, then this can mean that:

  1. The wrong URL is provided in your request. Please check the location of your study and use the right URL.
  2. The wrong study ID is provided in your request. You can find the 'Castor Study ID' in the study settings.


Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Castor Support Team

  2. Posted
  3. Updated