Fix: improve API error responses from os-hosts extenstion

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

Resolves bug 1154117.

Change-Id: Ic680403bdf1cb1fc1ac184352f486390fb04a195