Added unit-tests for client.fetch function.
Added error handling in client.fetch. Close #56