Bug 863548 - Validation errors in API are reported differently than other errors
Summary: Validation errors in API are reported differently than other errors
Keywords:
Status: CLOSED EOL
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Jiri Stransky
QA Contact: Rehana
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-05 18:50 UTC by Jiri Stransky
Modified: 2020-03-27 18:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

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.


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