[tests] add class ErrorCode
[test] add test when database is empty