JAL-3829 ensure tests use mocked service - proper exception for mocked 400 response
[jalview.git] / src / jalview / fts / service / pdb / PDBFTSRestClient.java
index 483bb2f..a06b0f2 100644 (file)
@@ -222,7 +222,7 @@ public class PDBFTSRestClient extends FTSRestClient implements StructureFTSRestC
         }
         break;
       case 400:
-        throw new Exception(parseJsonExceptionString(responseString));
+        throw new Exception(isMocked() ? "400 response (Mocked)" : parseJsonExceptionString(responseString));
       default:
         throw new Exception(
                 getMessageByHTTPStatusCode(responseStatus, "PDB"));