Skip to content

Commit 5ca2ddb

Browse files
authored
octavia-cli: Check if source discovery job failed and raise exception (#16410)
* Raising and adequate error message if the source is failing * Going back to test_api_http_headers from master
1 parent ba1154c commit 5ca2ddb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

octavia-cli/octavia_cli/apply/resources.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,9 @@ def catalog(self) -> AirbyteCatalog:
503503
AirbyteCatalog: The catalog issued by schema discovery.
504504
"""
505505
schema = self.api_instance.discover_schema_for_source(self.source_discover_schema_request_body)
506-
return schema.catalog
506+
if schema.job_info.succeeded:
507+
return schema.catalog
508+
raise Exception("Could not discover schema for source", self.source_discover_schema_request_body, schema.job_info.logs)
507509

508510
@property
509511
def definition(self) -> SourceDefinitionSpecificationRead:

0 commit comments

Comments
 (0)