check the error

This commit is contained in:
Asim Aslam
2021-05-18 17:43:14 +01:00
parent 80fa5e3e14
commit c878ddc976

View File

@@ -48,6 +48,7 @@ func Handler(w http.ResponseWriter, r *http.Request) {
}
// make new request
log.Printf("Calling: %v", apiURL+"?shortURL="+uri.String())
req, err := http.NewRequest("GET", apiURL+"?shortURL="+uri.String(), nil)
if err != nil {
http.Error(w, err.Error(), 500)