Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error re-deploying APIs previously deleted manually #100

Open
flaviostutz opened this issue Mar 10, 2023 · 1 comment
Open

Error re-deploying APIs previously deleted manually #100

flaviostutz opened this issue Mar 10, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@flaviostutz
Copy link

In some cases we face random errors when re-deploying an API with the same name after deleting it manually on WSO2

Steps to reproduce

  • Deploy an API with "sls deploy"
  • Open WSO2 panel and delete it manually
  • Deploy the api again with "sls deploy"

More info

Sometimes it works well, sometimes the plugin output log seems to be ok, but I see the API wasn't plublished (it's in "created" state), and sometimes I got the following errors on the console:


[serverless-wso2-apim] Upserting Swagger spec for ****-flavio..
[serverless-wso2-apim] Upserting.. OK
{
  response: {
    code: 403,
    message: 'Forbidden',
    description: "You don't have permission to access the API with Id *****",
    moreInfo: '',
    error: []
  },
  responseCode: 403,
  responseHeaders: {
    date: 'Fri, 10 Mar 2023 12:32:43 GMT',
    'content-type': 'application/json',
    'transfer-encoding': 'chunked',
    connection: 'close',
    'set-cookie': [
      '******; Expires=Fri, 17 Mar 2023 12:32:42 GMT; Path=/',
      'AWSALBCORS=*******; Expires=Fri, 17 Mar 2023 12:32:42 GMT; Path=/; SameSite=None; Secure'
    ],
    'x-content-type-options': 'nosniff',
    'x-xss-protection': '1; mode=block',
    server: 'EAPIM Server'
  }
}
[serverless-wso2-apim] An error occurred while retrieving Invokable API URL, proceeding further.

OR

{
  response: {
    code: 500,
    message: 'Internal server error',
    description: 'Error while adding new API : null-[name_of_my_api_here]-v1 - Error while performing registry transaction operation',
    moreInfo: '',
    error: []
  },
  responseCode: 500,
  responseHeaders: {
    date: 'Fri, 10 Mar 2023 12:28:46 GMT',
    'content-type': 'application/json',
    'transfer-encoding': 'chunked',
    connection: 'close',
    'set-cookie': [
      'AWSALB=*****; Expires=Fri, 17 Mar 2023 12:28:45 GMT; Path=/',
      'AWSALBCORS=******; Expires=Fri, 17 Mar 2023 12:28:45 GMT; Path=/; SameSite=None; Secure'
    ],
    'x-content-type-options': 'nosniff',
    'x-xss-protection': '1; mode=block',
    server: 'EAPIM Server'
  }
}
@ramgrandhi ramgrandhi added the help wanted Extra attention is needed label May 9, 2023
@ramgrandhi
Copy link
Owner

@flaviostutz - can you test if it still persists with the latest version? It helps to prioritise this issue. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants