diclient/diclient: add error handling from API, initial commit of
diclient/sessions