apigee / apigee-client-php

Client library to make API calls to Apigee Edge Management API
Apache License 2.0
27 stars 30 forks source link

InvalidArgumentException: TYPE_PAID type is not a valid #244

Closed aspaez closed 1 year ago

aspaez commented 1 year ago

Description

In configuring the Apigee X connection using a key from a service account with the Apigee Organization Admin role, we get an InvalidArgumentException error: TYPE_PAID type is not a valid. in /var/www/devportal/code/vendor/apigee/apigee-client-php/src/Api/Management/Entity/Organization.php:83

We consult the organization api and type key contains the value "TYPE_PAID"

Apigee Info

Apigee X

Steps to Reproduce

Steps to reproduce the behavior: 1.- We enter the drupal administration portal. 2.- We go to the Administration/Configuration/Apigee Edge menu 3.- We select Apigee Edge Connection Settings. Apigee instace type Apigee X 4.- We place the name of our organization 5.- Paste the service account key 6.- We test the connection and it shows the error shown in the Debug Information section

Actual Behavior

Show de message: { "endpoint": "https:\/\/apigee.googleapis.com\/v1", "organization": "xxxxx" } { "auth_type": "jwt", "key_provider": "Drupal\key\Plugin\KeyProvider\ConfigKeyProvider" } { "langcode": "es", "http_client_connect_timeout": 30, "http_client_timeout": 30, "http_client_proxy": "" } InvalidArgumentException: TYPE_PAID type is not a valid. in /var/www/devportal/code/vendor/apigee/apigee-client-php/src/Api/Management/Entity/Organization.php:83

Expected Behavior

Terminate the connection to the organization

Screenshots

Type error

Notes

Add any other context about the problem here.

Version Info

Apigee Developer Portal Kickstart for GCP Operating System: Debian (11)

Software: NGINX (1.18.0) Drupal (9.4.x) MySQL-Client (8.0.31) PHP (8.1.2) Ops Agent (2.22.0)

phdhiren commented 1 year ago

@aspaez

Can you share more debug information on this. Please enable apigee_edge_debug module and here is how to use check debug logs Please also share composer.json to reproduce the error. Please remove any sensitive data please remove or share via email which is on my profile.

phdhiren commented 1 year ago

@aspaez

Let me know if the patch in above PR worked for you or not?

aspaez commented 1 year ago

Hi

Thanks so much for the support, its working. We will continue with our configuration.

Kind regards

El mié, 22 feb 2023 a las 7:18, phdhiren @.***>) escribió:

@aspaez https://github.com/aspaez

Let me know if the patch in above PR worked for you or not?

— Reply to this email directly, view it on GitHub https://github.com/apigee/apigee-client-php/issues/244, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP3HA7SGUVPODXNRZSYKMHLWYYG3JANCNFSM6AAAAAAUH5RZPY . You are receiving this because you were mentioned.Message ID: @.***>

--

Alejandro Soto Paez

o: +52 55 8421 6320 d: Shakespeare 189 Col. Anzures, Miguel Hidalgo, 11590, CDMX w: amarello.cloud http://www.amarello.com.mx/ e: @.*** https://www.linkedin.com/company/amarello-tecnologias-de-informacion https://twitter.com/amarello_mx https://www.facebook.com/amarello.mx Cloud journey with peace of mind