Fix: ap/show does not return on error (#3704)
This commit is contained in:
parent
c8607ff7b6
commit
f7964da899
|
@ -25,11 +25,10 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
export default define(meta, (ps) => new Promise((res, rej) => {
|
||||||
const object = await fetchAny(ps.uri);
|
fetchAny(ps.uri)
|
||||||
if (object == null) return rej('object not found');
|
.then(object => object != null ? res(object) : rej('object not found'))
|
||||||
|
.catch(e => rej(e));
|
||||||
res(object);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
Loading…
Reference in New Issue