# Handling "Type IOError has no field status" with some delay

**URL:** https://discourse.julialang.org/t/handling-type-ioerror-has-no-field-status-with-some-delay/43369
**Category:** New to Julia
**Created:** [July 20, 2020, 12:22pm UTC](https://discourse.julialang.org/t/handling-type-ioerror-has-no-field-status-with-some-delay/43369 "2020-07-20T12:22:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nash](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nash/32/14482_2.png) [@Nash](https://discourse.julialang.org/u/Nash)
#### Post date: [July 20, 2020, 12:22pm UTC](https://discourse.julialang.org/t/handling-type-ioerror-has-no-field-status-with-some-delay/43369/1 "2020-07-20T12:22:47Z")

</div>

I make regular calls to an API. Sometimes the call results in the error “type IOError has no field status”. Rather than my script stopping, I would like to handle that error and permit the script to continue.

What is the best way to handle the stated error, if I am interested in the script waiting some time before attempting again?

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [July 20, 2020, 12:53pm UTC](https://discourse.julialang.org/t/handling-type-ioerror-has-no-field-status-with-some-delay/43369/2 "2020-07-20T12:53:23Z")

</div>

You probably want a `try/catch` block:

[https://docs.julialang.org/en/v1/manual/control-flow/#The-try/catch-statement-1](https://docs.julialang.org/en/v1/manual/control-flow/#The-try/catch-statement-1)

---

<div class="post-metadata">

### Author: ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)
#### Post date: [July 20, 2020, 1:14pm UTC](https://discourse.julialang.org/t/handling-type-ioerror-has-no-field-status-with-some-delay/43369/3 "2020-07-20T13:14:58Z")

</div>

> type IOError has no field status

This is a very strange error of the API. It seems like it has thrown a IOError for some reason, captured the error, and tried to access a nonexistent field in the IOError, as it was expecting other type of error object in that context and did not check if the raised error was of the expected type.
