Index: gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriinterface/services/ReoTuhituhiApiService.java
===================================================================
--- gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriinterface/services/ReoTuhituhiApiService.java	(revision 35241)
+++ gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriinterface/services/ReoTuhituhiApiService.java	(revision 35242)
@@ -11,9 +11,12 @@
 
 import com.google.gson.Gson;
+import com.google.gson.JsonSyntaxException;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
+import org.atea.nlptools.koreromaoriinterface.exceptions.ReoTuhituhiException;
 import org.atea.nlptools.koreromaoriinterface.models.AudioFilePart;
 import org.atea.nlptools.koreromaoriinterface.models.TranscriptionResult;
+import org.atea.nlptools.koreromaoriinterface.services.HttpRequestService.HttpRequestException;
 
 /**
@@ -43,8 +46,9 @@
      * @param audioFileParts The audio files to retrieve a transcription for.
      * @return A list of {@link TranscriptionResult} objects.
-     * @throws Exception
+     * @throws HttpRequestException When the API call fails.
+     * @throws JsonSyntaxException When the result cannot be parsed.
      */
-    public List<AudioFilePart> GetTranscriptions(Iterable<AudioFilePart> audioFileParts)
-        throws Exception
+    public List<AudioFilePart> getTranscriptions(Iterable<AudioFilePart> audioFileParts)
+        throws HttpRequestException, JsonSyntaxException, Exception
     {
         Queue<Future<AudioFilePart>> apiCalls = new LinkedList<Future<AudioFilePart>>();
@@ -64,4 +68,5 @@
             TranscriptionResult res = getTranscription(part.dataStream);
             part.setTranscriptionResult(res);
+
             apiResults.add(part);
         }
@@ -78,4 +83,52 @@
     }
 
+    /**
+     * Calls the Reo Tuhituhi API to transcribe a wave audio file.
+     * 
+     * @param audioStream The wave audio stream.
+     * @return A {@link TranscriptionResult} object.
+     * @throws HttpRequestException Thrown when the API call fails.
+     * @throws JsonSyntaxException Thrown when the result cannot be parsed.
+     * @throws ReoTuhituhiException Thrown when the Reo Tuhituhi API returns an invalid response.
+     */
+    public TranscriptionResult getTranscription(InputStream audioStream)
+        throws HttpRequestException, JsonSyntaxException, ReoTuhituhiException
+    {
+        HttpRequestService request = HttpRequestService
+            .post(apiEndpoint)
+            .authorization("Basic " + apiKey)
+            .send(audioStream);
+
+        // Check that the request returned an OK status
+        if (!request.ok())
+        {
+            logger.error
+            (
+                "The Reo Tuhituhi API returned a non-OK status code {} with message {}",
+                request.code(),
+                request.message()
+            );
+
+            throw new ReoTuhituhiException(request.code(), request.message(), "Non-OK status code");
+        }
+
+        // Check that the content type is valid
+        if (request.contentType() != "application/json")
+        {
+            logger.error
+            (
+                "The Reo Tuhituhi API returned an invalid content type {}. Provided content was {}",
+                request.contentType(),
+                request.body()
+            );
+
+            throw new ReoTuhituhiException(request.code(), request.message(), "Invalid content type: " + request.contentType());
+        }
+
+        TranscriptionResult res = jsonSerialiser.fromJson(request.body(), TranscriptionResult.class);
+
+        return res;
+    }
+
     private Callable<AudioFilePart> getTranscriptionCallable(final AudioFilePart part)
     {
@@ -83,5 +136,6 @@
         {
             @Override
-            public AudioFilePart call() throws Exception
+            public AudioFilePart call()
+                throws Exception
             {
                 TranscriptionResult res = getTranscription(part.dataStream);
@@ -91,18 +145,3 @@
         };
     }
-
-    private TranscriptionResult getTranscription(InputStream audioStream)
-        throws Exception
-    {
-        String jsonResponse = HttpRequestService
-            .post(apiEndpoint)
-            .authorization("Basic " + apiKey)
-            .send(audioStream)
-            .body();
-
-        logger.trace("Reo Tuhituhi API responded with a success status.");
-        TranscriptionResult res = jsonSerialiser.fromJson(jsonResponse, TranscriptionResult.class);
-        logger.trace("Reo Tuhituhi API response was succesfully deserialised.");
-        return res;
-    }
 }
