Add api to user error to get error code as a string