server: Don't set last error in get_handle(), move that into the callers.