Fix: improve API error responses from os-hosts extension

Modify responses to include the actual host instead of %(host)s.

Resolves bug 1154117.

Change-Id: Ic680403bdf1cb1fc1ac184352f486390fb04a195