https://codereview.appspot.com/14789043/diff/3001/charmworld/views/api.py#newcode503
charmworld/views/api.py:503: 'debug_info': [],
and a global level 'debug_info' to match the representation of errors of
other areas of the code where they all provide a message as well as
helpful debug information to assist in finding the way to correct the
error.
https://codereview.appspot.com/14789043/diff/3001/charmworld/views/api.py#newcode514
charmworld/views/api.py:514: try:
moved the old checks to the try:catch for the ProofError. I felt this
read a bit cleaner and allows for a function to return a value (the
parsed yaml file) normally, but have a complex object come back during a
failure.
Reviewer comments added.
https:/ /codereview. appspot. com/14789043/ diff/3001/ charmworld/ views/api. py views/api. py (right):
File charmworld/
https:/ /codereview. appspot. com/14789043/ diff/3001/ charmworld/ views/api. py#newcode501 views/api. py:501: 'errors': [],
charmworld/
this is the list of actual errors. They can be global messages ('could
not parse the file') or objects from error checking a specific bundle in
the file.
https:/ /codereview. appspot. com/14789043/ diff/3001/ charmworld/ views/api. py#newcode502 views/api. py:502: 'error_messages': [],
charmworld/
this is a summary of all error messages provided as an aid to marco.
https:/ /codereview. appspot. com/14789043/ diff/3001/ charmworld/ views/api. py#newcode503 views/api. py:503: 'debug_info': [],
charmworld/
and a global level 'debug_info' to match the representation of errors of
other areas of the code where they all provide a message as well as
helpful debug information to assist in finding the way to correct the
error.
https:/ /codereview. appspot. com/14789043/ diff/3001/ charmworld/ views/api. py#newcode514 views/api. py:514: try:
charmworld/
moved the old checks to the try:catch for the ProofError. I felt this
read a bit cleaner and allows for a function to return a value (the
parsed yaml file) normally, but have a complex object come back during a
failure.
https:/ /codereview. appspot. com/14789043/ diff/3001/ charmworld/ views/tests/ test_api. py views/tests/ test_api. py (right):
File charmworld/
https:/ /codereview. appspot. com/14789043/ diff/3001/ charmworld/ views/tests/ test_api. py#newcode905 views/tests/ test_api. py:905: 'errors' ][0]['services' ]['db'] [0]['message' ])
charmworld/
results[
this is due to the move to support multiple errors on the same service
within a bundle.
https:/ /codereview. appspot. com/14789043/