handle HangaException when calling the API. closes #1