opencoweb / coweb

Open Cooperative Web Framework
Other
232 stars 29 forks source link

Server needs to handle errors instead of ignoring #214

Closed ccotter closed 11 years ago

ccotter commented 11 years ago

There are a few cases in the Java server (SessionHandler.java) where a client make a request where the client does not have permission to (e.g. moderator.canClientMakeServiceRequest returns false). If the client is not allowed to do something, the server simply ignores the request. There are three TODOs about sending an error response in these cases.

ccotter commented 11 years ago

I will create a new channel for error messages, as this provides flexibility and generality in supplying error responses.

ccotter commented 11 years ago

One more thing needs to be done, then this can be closed: handle the two errors for service subscription and post service message in the client.

ccotter commented 11 years ago

Only the disallowed join error uses the new /session/error channel. Disallowed service subscribe and post message use the same channel for sending legitimate messages, but now an error boolean is set in the client javascript callback. See postService and subscribeService.