Bug 1064093

Summary: Error message "[ERROR] Locale XX is not enabled in server" when pushing the unsupported locale
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: Component-LogicAssignee: Patrick Huang <pahuang>
Status: CLOSED UPSTREAM QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: developmentCC: djansen, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-31 01:48:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ding-Yi Chen 2014-02-12 01:52:49 UTC
Description of problem:
When pushing unsupported locales file
mvn zanata:push -Dzanata.pushType=both

It shows the warning message:
[==   ][WARNING] Authentication error: Unable to respond to any of these challenges: {}
[ERROR] Operation failed: Error status 401 Unauthorized returned

This warning message is misleading because:
1. The execution actually stops.
2. User would not know it is because of unsupported locales.

Version-Release number of selected component (if applicable):
Building Zanata server modules 3.3.0-SNAPSHOT
zanata-maven-plugin:3.3.1-SNAPSHOT

How reproducible:
Always

Steps to Reproduce:
1. Edit zanata.xml and put an unsupported locale, 
   note that the translation files for those locale should actuall exists.
2. mvn zanata:push -Dzanata.pushType=both 

Actual results:
Show following warning/error messages:
[==   ][WARNING] Authentication error: Unable to respond to any of these challenges: {}
[ERROR] Operation failed: Error status 401 Unauthorized returned

Expected results:
Error message:
[ERROR] Operation failed: Locale XXX is not supported in server. Either 
1) Ask Zanata admin to add the XXX
2) Remove locale XXX from zanata.xml



Additional info:

Comment 1 Ding-Yi Chen 2014-02-12 02:03:18 UTC
As Sean suggest, this could be the server that return the incorrect error code.
That is, it should be return 403 instead of 401.

Comment 2 Ding-Yi Chen 2014-10-02 03:46:44 UTC
*** Bug 1148644 has been marked as a duplicate of this bug. ***

Comment 3 Zanata Migrator 2015-07-31 01:48:07 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-546