@@ -157,11 +157,11 @@ def test_parse_file_filled_single_page_must_succeed(
157157
158158@pytest .mark .integration
159159@pytest .mark .v2
160- def test_invalid_uuid_must_throw_error_422 (v2_client : ClientV2 ) -> None :
160+ def test_invalid_uuid_must_throw_error (v2_client : ClientV2 ) -> None :
161161 """
162162 Using an invalid model identifier must trigger a 422 HTTP error.
163163 """
164- input_path : Path = FILE_TYPES_DIR / "pdf" / "multipage_cut-2 .pdf"
164+ input_path : Path = FILE_TYPES_DIR / "pdf" / "blank_1 .pdf"
165165
166166 input_source = PathInput (input_path )
167167 params = InferenceParameters (model_id = "INVALID MODEL ID" )
@@ -173,6 +173,55 @@ def test_invalid_uuid_must_throw_error_422(v2_client: ClientV2) -> None:
173173 assert exc .status == 422
174174
175175
176+ @pytest .mark .integration
177+ @pytest .mark .v2
178+ def test_unknown_model_must_throw_error (v2_client : ClientV2 ) -> None :
179+ """
180+ Using an unknown model identifier must trigger a 404 HTTP error.
181+ """
182+ input_path : Path = FILE_TYPES_DIR / "pdf" / "blank_1.pdf"
183+
184+ input_source = PathInput (input_path )
185+ params = InferenceParameters (model_id = "fc405e37-4ba4-4d03-aeba-533a8d1f0f21" )
186+
187+ with pytest .raises (MindeeHTTPErrorV2 ) as exc_info :
188+ v2_client .enqueue_inference (input_source , params )
189+
190+ exc : MindeeHTTPErrorV2 = exc_info .value
191+ assert exc .status == 404
192+
193+
194+ @pytest .mark .integration
195+ @pytest .mark .v2
196+ def test_unknown_webhook_ids_must_throw_error (
197+ v2_client : ClientV2 , findoc_model_id : str
198+ ) -> None :
199+ """
200+ Using an unknown webhook identifier must trigger an error.
201+ """
202+ input_path : Path = FILE_TYPES_DIR / "pdf" / "blank_1.pdf"
203+
204+ input_source = PathInput (input_path )
205+ params = InferenceParameters (
206+ model_id = findoc_model_id ,
207+ webhook_ids = [
208+ "fc405e37-4ba4-4d03-aeba-533a8d1f0f21" ,
209+ "fc405e37-4ba4-4d03-aeba-533a8d1f0f21" ,
210+ ],
211+ rag = None ,
212+ raw_text = None ,
213+ polygon = None ,
214+ confidence = None ,
215+ )
216+
217+ with pytest .raises (MindeeHTTPErrorV2 ) as exc_info :
218+ v2_client .enqueue_inference (input_source , params )
219+
220+ exc : MindeeHTTPErrorV2 = exc_info .value
221+ assert exc .status == 422
222+ assert "no matching webhooks" in exc .detail .lower ()
223+
224+
176225@pytest .mark .integration
177226@pytest .mark .v2
178227def test_url_input_source_must_not_raise_errors (
0 commit comments