Permalink
Browse files

fix(rest): Return null for failed json parsin

  • Loading branch information...
RWOverdijk committed Dec 22, 2015
1 parent e2c4688 commit 12679c49118a04c7c48c2d75d30f46d29de823dc
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/rest.js
@@ -41,7 +41,9 @@ export class Rest {
requestOptions.body = json(body);
}

return this.client.fetch(path, requestOptions).then(response => response.json());
return this.client.fetch(path, requestOptions).then(response => {
return response.json().catch(error => null);
});
}

/**

0 comments on commit 12679c4

Please sign in to comment.