Giter Club home page Giter Club logo

Comments (1)

johnlim avatar johnlim commented on June 8, 2024

##Update
I managed to duplicate the issue. Using the project from https://github.com/serverless/event-gateway-getting-started as an example:
The steps to reproduce the issue are as follows

  1. Clone the repo
  2. Modify serverless.yml to your own tenant and app
  3. Run npm install and then sls deploy
  4. Add a name parameter to the getUser function in serverless.yml as follows
functions:
  getUser:
    handler: handler.getUsers
    name: "whoAmIs"
    events:
      - eventgateway:
          type: sync
          eventType: http.request
          path: /users/:id
          method: GET
  1. Run sls deploy
  2. Modify the name parameter again. For example:
functions:
  getUser:
    handler: handler.getUsers
    name: "whoAmIsssssss" #update the name
    events:
      - eventgateway:
          type: sync
          eventType: http.request
          path: /users/:id
          method: GET
  1. Run sls deploy
  2. Error is displayed
Event Gateway Plugin
Serverless: WARNING: Inappropriate call of provider.request()
EventGateway: Function "getUser" registered. (ID: whoAmIs)
 
  Error --------------------------------------------------
 
  Could not subscribe the whoAmIs function to the '/huubaper-test/users/:id' endpoint. A subscription for that endpoint and method already exists in another service. Please remove that subscription before registering this subscription.
  1. Run sls remove
  2. Following error is displayed
Event Gateway Plugin
EventGateway: Subscription "user.created" removed from function: test-dev-emailUser
EventGateway: Subscription "http.request" removed from function: test-dev-createUser
EventGateway: Event Type "email.sent" removed.
 
  Error --------------------------------------------------
 
  Failed to delete http.request event type due the error: Event type cannot be deleted because there are subscriptions using it.

iirc, I've also encountered this issue when updating the handler name. Hope this helps.

from event-gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.