Skip to content

Commit

Permalink
Fixed review comment.
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Labordus <dennis.labordus@alliander.com>
  • Loading branch information
Dennis Labordus committed Nov 21, 2022
1 parent 4a79f98 commit c2db8c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/compas-services/Websocket.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { newPendingStateEvent } from '../foundation.js';
import {
APPLICATION_ERROR,
createLogEvent,
extractErrorMessage,
parseXml,
SERVER_ERROR,
Expand Down Expand Up @@ -44,15 +43,15 @@ export function websocket(
websocket?.close();
})
.catch(reason => {
createLogEvent(element, reason);
reject(reason);
websocket?.close();
});
};

websocket.onerror = () => {
reject({
type: SERVER_ERROR,
mesage: `Websocket Error in service "${serviceName}"`,
message: `Websocket Error in service "${serviceName}"`,
});
websocket?.close();
};
Expand Down

0 comments on commit c2db8c5

Please sign in to comment.