Skip to content

Commit

Permalink
octavia-cli: Check if source discovery job failed and raise exception (
Browse files Browse the repository at this point in the history
…airbytehq#16410)

* Raising and adequate error message if the source is failing

* Going back to test_api_http_headers from master
  • Loading branch information
marcelopio authored and jhammarstedt committed Oct 31, 2022
1 parent 3c27229 commit 99d2816
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion octavia-cli/octavia_cli/apply/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,9 @@ def catalog(self) -> AirbyteCatalog:
AirbyteCatalog: The catalog issued by schema discovery.
"""
schema = self.api_instance.discover_schema_for_source(self.source_discover_schema_request_body)
return schema.catalog
if schema.job_info.succeeded:
return schema.catalog
raise Exception("Could not discover schema for source", self.source_discover_schema_request_body, schema.job_info.logs)

@property
def definition(self) -> SourceDefinitionSpecificationRead:
Expand Down

0 comments on commit 99d2816

Please sign in to comment.