Cleanup of HTTP response codes in server API