The reason for the error is that name resolution doesn't work, which has to be done before the browser even sends out the http request (which then is intercepted by the hotspot and the user redirected to the login page). This part is clear...
The only way around the problem you describe which I can think of right now would involve having at least another server reachable from the hotspot network. You could install a "fake" dns server there that is replying with a fixed ip address for all A-record dns requests (regardless of the name requested).
Then run a webserver on this ip address stating "Our net connection is currently not available.".
Last step would be to add scripts to your hotspot that detect availibility of you internet connection (for example, use the netwatch tool) and redirect all dns request to your "fake dns server" when your uplink is more like a "down-link"
Regarding the "fake dns server": If you don't have anything at hand the easiest/cheapest way I can think of right now would be a LinkSys WRT54G with a custom Linux firmware. This could be the fake dns server and the webserver serving your "we are offline" page...