Skip to content

Commit 43a2187

Browse files
authored
Merge pull request #91 from OpenCHAMI/67-bug-impersonating-non-existent-node-does-not-err
fix: improve error handling in MetaDataHandler and SMDClient
2 parents b911cf1 + 7eb15da commit 43a2187

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/cloud-init-server/metadata_handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func MetaDataHandler(smd smdclient.SMDClientInterface, store cistore.Store) http
5656
id, err = smd.IDfromIP(ip)
5757
if err != nil {
5858
log.Print(err)
59-
w.WriteHeader(http.StatusUnprocessableEntity)
59+
http.Error(w, "Failed to retrieve node ID from IP address", http.StatusUnprocessableEntity)
6060
return
6161
} else {
6262
log.Printf("xname %s with ip %s found\n", id, ip)

0 commit comments

Comments
 (0)