Added a better error description if processor name is wrong. (#11488)

Replace this entire comment with:
  - **Description:** added a better error description for this error
  - **Issue:** #11407 
  
  @baskaryan
pull/11400/head^2
Leonid Kuligin 12 months ago committed by GitHub
parent e75766b759
commit 9e81ab47be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -64,6 +64,15 @@ class DocAIParser(BaseBlobParser):
"a client."
)
if processor_name and not processor_name.isalnum():
raise ValueError(
f"Processor name {processor_name} has a wrong format. Use only ID from"
"the `Basic information` section on the GCP console. E.g., if your "
"prediction endpoint looks like https://us-documentai.googleapis.com"
"/v1/projects/PROJECT_ID/locations/us/processors/PROCESSOR_ID:process"
", use only PROCESSOR_ID part."
)
self._gcs_output_path = gcs_output_path
self._processor_name = processor_name
if client:

Loading…
Cancel
Save