Skip to content

Commit

Permalink
client: js: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
turtleDev committed Oct 7, 2024
1 parent 2d8e18a commit 3dbfd37
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions clients/js/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class RaccoonClient extends EventEmitter {
this.timeout = options.timeout || 1000;
this.uuidGenerator = () => uuidv4();
this.protocol = options.protocol || 'rest';

if (this.protocol === 'rest') {
this.httpClient = axios.create();
} else if (this.protocol === 'ws') {
Expand Down Expand Up @@ -131,13 +131,12 @@ class RaccoonClient extends EventEmitter {
);

this.logger.info(`ended request, url: ${this.url}, req-id: ${requestId}`);


if (this.protocol !== 'rest') {
return {
reqId: requestId,
reqId: requestId
};
}
}

const sendEventResponse = this.marshaller.unmarshal(
response,
Expand All @@ -148,7 +147,6 @@ class RaccoonClient extends EventEmitter {
response: sendEventResponse.toJSON(),
error: null
};

} catch (error) {
this.logger.error(`error, url: ${this.url}, req-id: ${requestId}, ${error}`);
throw new Error(`req-id: ${requestId}, error: ${error}`);
Expand Down

0 comments on commit 3dbfd37

Please sign in to comment.