Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1055790 - Unhelpful error code returned for incorrect html type
Summary: Unhelpful error code returned for incorrect html type
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-API
Version: 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.3
Assignee: Patrick Huang
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-20 23:17 UTC by Damian Jansen
Modified: 2014-03-20 05:47 UTC (History)
3 users (show)

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 05:47:12 UTC


Attachments (Terms of Use)

Description Damian Jansen 2014-01-20 23:17:23 UTC
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-21 00:26:40 UTC
https://github.com/zanata/zanata-server/pull/343

Comment 2 Damian Jansen 2014-01-21 04:22:20 UTC
Verified at 7c59e4ccb46504bee75cc04c1dfd217648e3d4ef

Comment 3 Sean Flanigan 2014-03-20 05:47:12 UTC
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.