Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
api: fixed bug when raising exception
Browse files Browse the repository at this point in the history
* Fixes a bug due to a wrong argument when raising a RESTful exception.
  (closes #56)

Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
  • Loading branch information
jbenito3 committed Sep 8, 2015
1 parent 4627355 commit ae83bda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions claimstore/modules/claims/restful.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def validate_json(self, json_data):
try:
validate_json(json_data, self.json_schema)
except Exception as e:
raise InvalidJSONData('JSON data is not valid', details=str(e))
raise InvalidJSONData('JSON data is not valid', extra=str(e))


class Subscription(ClaimStoreResource):
Expand Down Expand Up @@ -232,7 +232,7 @@ def post(self):
except isodate.ISO8601Error as e:
raise InvalidJSONData(
'Claim `created` datetime does not follow ISO 8601 Z',
details=str(e)
extra=str(e)
)

claimant = Claimant.query.filter_by(name=json_data['claimant']).first()
Expand Down

0 comments on commit ae83bda

Please sign in to comment.