HUE-1833 [spark] Gracefully fail when the server is not up

Added error page and exception catching on API