error-handling for fetch_http