dev/ref#199 error handling