Fix datum test
Fix datum
Use error handler
Write unit test for client