Skip to content
Snippets Groups Projects
Commit 26f5be84 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[ivette] fixed empty correct response

parent 36e53a1c
No related branches found
No related tags found
No related merge requests found
......@@ -762,13 +762,9 @@ export function send<In, Out>(
const response: Response<Out> = new Promise<Out>((resolve, reject) => {
const unwrap = (js: Json.json): void => {
try {
const data = request.output(js);
if (data !== undefined)
resolve(data);
else
reject('Wrong response type');
resolve(request.output(js));
} catch (err) {
reject(`Decoding Error (${err})`);
reject(`Invalid ${request.name} response (${err})`);
}
};
pending.set(rid, { resolve: unwrap, reject });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment