[api] Added db manager for errors and api for making it accessible from interface