Bug 1055790 - Unhelpful error code returned for incorrect html type
Unhelpful error code returned for incorrect html type
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-API (Show other bugs)
3.2
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.3
Assigned To: Patrick Huang
Zanata-QA Mailling List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-20 18:17 EST by Damian Jansen
Modified: 2014-03-20 01:47 EDT (History)
3 users (show)

See Also:
Fixed In Version: 3.3.0-SNAPSHOT (20140121-1355)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-20 01:47:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Damian Jansen 2014-01-20 18:17:23 EST
Description of problem:
When attempting to use the rest api via a browser (which sends in the header a type of text/html) an error 500 is returned. It would be more appropriate if the error indicated "incorrect mime type" or similar.

Version-Release number of selected component (if applicable):
3.2.0

How reproducible:
Easy always

Steps to Reproduce:
1. Navigate a browser to https://translate.zanata.org/zanata/rest/projects
2. Note the error 500
3. In a console enter 
 > curl https://translate.zanata.org/zanata/rest/projects
4. Note the successful xml list

Actual results:
On entering the url into a browser, an error "500 Error processing Request" is displayed, and logging shows
> Failed to process REST request: java.lang.IllegalArgumentException: Failure parsing MediaType string: text/html,application/xhtml+xml,application/xml

Expected results:
Something a bit more user friendly.

Additional info:
Comment 1 Patrick Huang 2014-01-20 19:26:40 EST
https://github.com/zanata/zanata-server/pull/343
Comment 2 Damian Jansen 2014-01-20 23:22:20 EST
Verified at 7c59e4ccb46504bee75cc04c1dfd217648e3d4ef
Comment 3 Sean Flanigan 2014-03-20 01:47:12 EDT
Closing VERIFIED bugs for Zanata server 3.3.2.

Note You need to log in before you can comment on or make changes to this bug.