TRQ-2411: add unit test for checking get_err_msg; change format of err string

- fix in get_err_msg(): change convertion from int to string
- add unit test