While making requests to the SAYMON API, you may encounter some errors. This article contains a description of all such errors, the reasons that might lead to these errors, and possible ways to address them.
400 Bad Request
This error happens when you provide invalid request parameters. An example is an incorrect JSON body. In this case, a response would look like this:
This error can also occur when you don't include one of the mandatory query parameters. In this case, you will get the following:
A description inside the
message field might be useful to figure out how to fix the happened error.
This error means that something went wrong during authentication. Several reasons might lead to this error.
Not logged in
This error can occur if you don't use authentication at all. In this case, a response body will look like this:
If you apply the Session Authentication scheme but a session ID doesn't exist or was already deleted, you will get the same
401 error with this body:
Invalid login or password
If you use Basic Access Authentication but your login or password are incorrect, a response will look like this:
Invalid API token
When you use Token Authentication, but a token doesn't exist or was deleted, you will get the following error:
If you encounter one of these errors, check if your login credentials are correct or make sure that a session ID/token wasn't deleted and is still valid.
This error occurs if you try to make a request to a method but don't have required permissions. In this case, a response body will look like this:
message field describes what permissions you need to have to make requests to this method.
If you encounter this error, ask an administrator to check whether you have the required permissions and active them if necessary.
404 Not Found
This error happens when you try to make a request to a method that requires you to specify the ID of an item, but the item with this ID doesn't exist. In this case, a response will look like this:
If you encounter this error, make sure that the requested item exists and the ID you specified is correct.
This error happens when you provide an invalid request body (for example, you don't specify a required field).
The following example is an error message that occurs if you don't specify the
name parameter in the Create Class request.