Shall we do this only for FAILED status? For CANCELED queries, error message will be null