RG server.py: Better interpretation of error codes to HTTP status codes.