Skip to content

Commit

Permalink
Merge pull request #15 from Psychedelic/develop
Browse files Browse the repository at this point in the history
Version bump to 0.2.3
  • Loading branch information
jsonsivar authored Sep 29, 2021
2 parents e9ec40a + fae6cda commit f9ed1c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleekhq/browser-rpc",
"version": "2.0.2",
"version": "2.0.3",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"jsnext:main": "dist/esm/index.js",
Expand Down
4 changes: 1 addition & 3 deletions src/RPC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ export default abstract class RPC {
return new Promise((resolve, reject) => {
const resolver: Resolver = (err, res) => {
if (err) {
console.error(err);

reject(new Error(err.message));
return;
}
Expand All @@ -81,7 +79,7 @@ export default abstract class RPC {
this.calls.delete(id);

resolver({
code: JSON_RPC_ERROR_CODES.INTERNAL_ERROR,
code: JSON_RPC_ERROR_CODES.TIMEOUT_ERROR,
message: 'Request Timeout',
});
}
Expand Down
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const JSON_RPC_ERROR_CODES = {
METHOD_NOT_FOUND: -32601,
INVALID_PARAMS: -32602,
INTERNAL_ERROR: -32603,
TIMEOUT_ERROR: -32604,
SERVER_ERROR: -32000,
};

Expand Down

0 comments on commit f9ed1c4

Please sign in to comment.