mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 00:13:12 +03:00
http-api: If scry fails, return reject response
This commit is contained in:
parent
a4986078f5
commit
f5a8d8e937
@ -545,7 +545,12 @@ export class Urbit {
|
||||
const response = await fetch(
|
||||
`${this.url}/~/scry/${app}${path}.json`,
|
||||
this.fetchOptions
|
||||
);
|
||||
)
|
||||
|
||||
if (!response.ok) {
|
||||
return Promise.reject(response);
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user