add getError function. we will use unified ERROR CODE in BITs