[
https://issues.apache.org/jira/browse/GUACAMOLE-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16351628#comment-16351628
]
Michael Jumper commented on GUACAMOLE-499:
------------------------------------------
{quote}
... my best guess would be that the {{getStatus()}} function of
{{GuacamoleException}} (or the mappiing between the status codes and HTTP
status codes) was added after the exception handling within the REST API, ...
{quote}
Nope - I'm wrong. The mapping of {{GuacamoleException}} to status codes to HTTP
codes has existed since 0.9.0, well before when Guacamole was migrated over
from hand-coded servlets to a sane REST API. I have no idea why
{{RESTExceptionWrapper}} does not leverage this.
> REST API Error Codes should come from GuacamoleStatus
> -----------------------------------------------------
>
> Key: GUACAMOLE-499
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-499
> Project: Guacamole
> Issue Type: Improvement
> Components: guacamole
> Reporter: Nick Couchman
> Assignee: Nick Couchman
> Priority: Trivial
>
> Currently the RESTExceptionWrapper catches specific GuacamoleException-types
> and throws specific Response.Status types for those exceptions. Since the
> HTTP response code is embedded in the Exceptions via the GuacamoleStatus
> object in those exceptions, and that status is used in the tunnel, already,
> it seems to make sense to use this code in the REST API, as well.
> Unless there's some specific reason we're not?
> PR coming soon...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)