Fix routing issue due to success/error by replacing with then/catch in createNewPhoto