Index: src/org/w3c/unicorn/request/URIRequest.java
===================================================================
--- src/org/w3c/unicorn/request/URIRequest.java	(revision 578:cff8f2db6099)
+++ src/org/w3c/unicorn/request/URIRequest.java	(revision 590:2d262331b28a)
@@ -1,3 +1,3 @@
-// $Id: URIRequest.java,v 1.8 2009-09-30 13:37:15 tgambet Exp $
+// $Id: URIRequest.java,v 1.9 2009-09-30 15:22:42 tgambet Exp $
 // Author: Damien LEROY.
 // (c) COPYRIGHT MIT, ERCIM ant Keio, 2006.
@@ -9,4 +9,5 @@
 import java.io.UnsupportedEncodingException;
 import java.net.ConnectException;
+import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.SocketTimeoutException;
@@ -123,8 +124,17 @@
 			logger.debug("URL : " + aURL + " .");
 			
-			URLConnection aURLConnection = aURL.openConnection();
+			HttpURLConnection aURLConnection = (HttpURLConnection) aURL.openConnection();
 			aURLConnection.setConnectTimeout(connectTimeOut);
 			aURLConnection.setReadTimeout(readTimeOut);
 			aURLConnection.setRequestProperty("Accept-Language", this.sLang);
+			
+			aURLConnection.connect();
+			int responseCode = aURLConnection.getResponseCode();
+			switch (responseCode) {
+			case HttpURLConnection.HTTP_NOT_FOUND:
+				throw new UnicornException(Message.Level.ERROR, "$message_observer_not_found " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+			case HttpURLConnection.HTTP_INTERNAL_ERROR:
+				throw new UnicornException(Message.Level.ERROR, "$message_observer_internal_error " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+			}
 			
 			InputStream is = aURLConnection.getInputStream();
@@ -145,4 +155,5 @@
 			}
 		} catch (IOException e) {
+			logger.error(e.getMessage(), e);
 			throw new UnicornException(new Message(e));
 		}
