fix error handling on docker