Skip to content

Commit

Permalink
refactor: clean error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ma committed Feb 27, 2024
1 parent 489f748 commit 3e65451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -905,11 +905,11 @@ Invalid certificate files, please check your:
const { role, registeredPlugins } = payload;

if (!roles.includes(role)) {
console.error(`[soundworks.Server] A client with invalid type ("${role}") attempted to connect`);
console.error(`[soundworks.Server] A client with invalid role ("${role}") attempted to connect`);

socket.send(CLIENT_HANDSHAKE_ERROR, {
type: 'invalid-client-type',
message: `Invalid client type, please check server configuration (valid client types are: ${roles.join(', ')})`,
message: `Invalid client role, please check server configuration (valid client roles are: ${roles.join(', ')})`,
});
return;
}
Expand Down

0 comments on commit 3e65451

Please sign in to comment.