I want to branch conditionally when an error response is returned by Google Map API [closed]

I want to do something like. If the response contains an error, use an iframe without using the API. Pseudo code <script async defer src=”https://maps.googleapis.com/maps/api/js?key=xxxx&callback=initialize”> </script> <script> if( Google Map API Responce error ){ </script> <iframe src=”http://maps.google.co.jp/maps?xxxx”></iframe> <script> }else{ var map = new google.maps.Map(document.getElementById(‘map’), { center: xxxx, zoom: 18 }); } </script> The problem I…

Details