openaq / openaq-metadata-editor

MIT License
1 stars 1 forks source link

Fix/51 catch error #57

Closed necoline closed 4 years ago

necoline commented 4 years ago

51

Added error message component with an option to retry the form save Added a catch to the update metadata request

TODO: add error message from api to the error message

necoline commented 4 years ago

To test that the error message is coming through, I added throw new Error('test message') above live 82 I went to the api to throw an error to make sure that the message was coming all the way through. This did not turn out as expected. All errors that I threw were sent as generic 500 errors and the putMetadata request in actions did not catch this. From what I can tell this is not an issue with the way the promise is written. However, I'd love a second pair of eyes to confirm this is the case

I think more work needs to be done on the API level to ensure that errors are being properly passed to the frontend