Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

documentai - "Error: 3 INVALID_ARGUMENT: due to apiEndpoint not defined in service client #131

Description

@lelesrc

Environment details

  • OS: ubuntu 22.04
  • Node.js version: 20.9.0
  • npm version: 10.2.3
  • google-cloud-node version: 0.0.26

Steps to reproduce

When using a documentai node, the following error is returned:
message: "Error: 3 INVALID_ARGUMENT: Request contains an invalid argument."

Workaround

Define apiEndpoint in file documentai.js:191

189             documentProcessorServiceClient = new DocumentProcessorServiceClient({
190                 "credentials": credentials,
191                 "apiEndpoint": "eu-documentai.googleapis.com"
192             });

Fix

apiEndpoint could be inferred from location (eu/us) or set by the user in node config.endPoint (more future-proof).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions