Bug 863548

Summary: Validation errors in API are reported differently than other errors
Product: [Retired] CloudForms Cloud Engine Reporter: Jiri Stransky <jstransk>
Component: aeolus-conductorAssignee: Jiri Stransky <jstransk>
Status: CLOSED EOL QA Contact: Rehana <aeolus-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.1.0CC: morazi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Jiri Stransky 2012-10-05 18:50:48 UTC
Description of problem:

Validation errors on API requests have a different response format from other errors (e.g. resource not found). We should consistently use one format for reporting API errors to client applications.
  
Actual results:

Validation errors are reported as

<errors>
  <error>
    <message>Catalog name has already been taken</message>
  </error>
</errors>


Expected results:

Validation errors should be reported as

<error>
  <code>ValidationError</code>
  <message>Catalog name has already been taken</message>
</error>

Comment 1 Jiri Stransky 2012-10-05 18:54:06 UTC
Solution posted as pull request:

https://github.com/aeolusproject/conductor/pull/104

Comment 3 Jiri Stransky 2012-10-09 16:51:51 UTC
It was concluded on IRC that we'll postpone this for now and fix it for v2 of the API (that should come with CF 2.0?). If we fixed it now, then API that was already published as part of CF 1.0 would be broken by the change.