If you are running your own sage cell server, you can decide if terms of service are required.  We are only turning them on our server at University of Washington, at the insistence of UW lawyers.

As for the errors---right now there is no error checking of the HTTP status code.  If the terms of service or any other error occurs, we aren't checking it, but should be.  Here are two ways to get access to the HTTP status code from curl:

```
% # First line contains error code
% curl -i -k -sS -L --data-urlencode "code=print 1+2" http://sagecell.sagemath.org/service
HTTP/1.1 403 Forbidden
Date: Sun, 24 Nov 2013 09:24:29 GMT
Content-Length: 156
Content-Type: text/html; charset=UTF-8
Server: TornadoServer/3.1

When evaluating code, you must acknowledge your acceptance
of the terms of service at /static/tos.html by passing the parameter or cookie
accepted_tos=true


% # Last line contains error code
% curl -w "\n%{http_code}" -k -sS -L --data-urlencode "code=print 1+2" http://sagecell.sagemath.org/service
When evaluating code, you must acknowledge your acceptance
of the terms of service at /static/tos.html by passing the parameter or cookie
accepted_tos=true

403


Compare with:

% curl -i -k -sS -L --data-urlencode "accepted_tos=true" --data-urlencode "code=print 1+2" http://sagecell.sagemath.org/service
HTTP/1.1 200 OK
Content-Length: 174
Server: TornadoServer/3.1
Access-Control-Allow-Credentials: true
Date: Sun, 24 Nov 2013 09:26:15 GMT
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8

{"user_variables": {}, "execute_reply": {"status": "ok", "execution_count": 1, "user_variables": {}, "payload": [], "user_expressions": {}}, "success": true, "stdout": "3\n"}

or

% curl -w "\n%{http_code}" -k -sS -L --data-urlencode "accepted_tos=true" --data-urlencode "code=print 1+2" http://sagecell.sagemath.org/service
{"user_variables": {}, "execute_reply": {"status": "ok", "execution_count": 1, "user_variables": {}, "payload": [], "user_expressions": {}}, "success": true, "stdout": "3\n"}
200
```