Skip to content

Taskserver troubleshooting

Brady Trainor edited this page Nov 1, 2021 · 16 revisions

Notes on Taskserver responses

If you see errors during statistics or synchronization requests, you may consider the following notes.

Server Errors

The server may generate many errors (See Protocol), but the following is a list of the ones most in need of special handling:

200 Success
201 No change
301 Redirect
430 Access denied
431 Account suspended
432 Account terminated
5xx Error

The 200 indicates success, and that a change was recorded. The 201 indicates success but no changes were necessary. The 301 is a redirect message indicating that the client MUST re-request from a new server. The 43x series messages are account-related. Any 5xx series code is a server error of some kind. All errors consist of a code and a status message.

-- https://taskwarrior.org/docs/design/client.html

The following is from https://github.com/GothenburgBitFactory/taskwarrior/blob/v2.5.3/src/commands/CmdSync.cpp#L274-L278.

    else if (code == "201")
    {
      Context::getContext ().footnote ("Sync successful.  No changes.");
      status = 0;
    }

The following is from https://github.com/GothenburgBitFactory/taskwarrior/blob/v2.5.3/src/commands/CmdSync.cpp#L287-L291.

    else if (code == "430")
    {
      Context::getContext ().error ("Sync failed.  Either your credentials are incorrect, or your account doesn't exist on the Taskserver.");
      status = 2;
    }

Statistics success

Here's what a successful call to statistics () may result in.

Exceptions

SocketException

Specifying the wrong port could result in a long wait and then the following.

SocketException: OS Error: Operation timed out, errno = 60, address = example.info, port = 58698

No internet connection could result in the following.

SocketException: Failed host lookup: 'example.info' (OS Error: nodename nor servname provided, or not known, errno = 8)

BadCertificateException

If the OS APIs can't verify the server certificate with your CA file, you might see the following:

TlsException

Issues with your client certificate or key might result in something like the following:

EmptyResponseException

If the CA configured on your Taskserver do not match the client cert/key pair configured on your client, the server may send a response of an empty list of bytes, which may result in the following:

TaskserverResponseException

Incorrect credentials could result in the following error message:

Clone this wiki locally