on master help sign in
add notes about failure cases for scries and threads
6bb05d0Tinnus Napbus
content/docs/userspace/http-api-guide.md+6−3
@@ -44,7 +44,7 @@ paths](#subscriptions), pokes, etc, are intended to be used from a front-end, so
44not all use marks which can be converted to and from JSON (the `noun` mark for
44not all use marks which can be converted to and from JSON (the `noun` mark for
45example). If documentation is available for the agent or thread in question, it
45example). If documentation is available for the agent or thread in question, it
46should note in some fashion whether it can take or produce JSON. The majority of
46should note in some fashion whether it can take or produce JSON. The majority of
47−things you'll want to interact with through Eyre _will_ work with JSON.
47+things you'll want to interact with through Eyre will work with JSON.
48
48
49### Gall agents
49### Gall agents
50
50
@@ -553,7 +553,9 @@ The `scry` function takes two arguments in a object:
553| `path` | `string` | The path to scry, sans the `care`. | `"/keys"` |
553| `path` | `string` | The path to scry, sans the `care`. | `"/keys"` |
554
554
555The `scry` function returns a promise that, if successful, contains the
555The `scry` function returns a promise that, if successful, contains the
556−requested data as JSON.
556+requested data as JSON. If the scry failed, for example due to a non-existent
557+scry endpoint, connection problem, or mark conversion failure, the promise will
558+fail.
557
559
558#### Example
560#### Example
559
561
@@ -597,7 +599,8 @@ The `thread` function takes five arguments in an object:
597| `desk` | `string` | The desk in which the thread resides. This may be ommitted if previously set for the whole `Urbit` object. | `"landscape"` |
599| `desk` | `string` | The desk in which the thread resides. This may be ommitted if previously set for the whole `Urbit` object. | `"landscape"` |
598
600
599The `thread` function will produce a promise that, if successful, contains the
601The `thread` function will produce a promise that, if successful, contains the
600−JSON result of the thread.
602+JSON result of the thread. If the thread failed, a connection error occurred, or
603+mark conversion failed, the promise will fail.
601
604
602#### Example
605#### Example
603
606