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 when the server is not specified #371

Closed
KhudaDad414 opened this issue Dec 23, 2022 · 3 comments · Fixed by #373
Closed

Error when the server is not specified #371

KhudaDad414 opened this issue Dec 23, 2022 · 3 comments · Fixed by #373
Labels
bug Something isn't working released stale

Comments

@KhudaDad414
Copy link
Member

KhudaDad414 commented Dec 23, 2022

#272 had the side effect of specifying server in send messages mandatory.
I mean this worked with previous versions:

{
  send: [{
    payload: 'my message'
  }]
}

but now it gives:

x Cannot read property 'protocol' of null
    at file:///Users/khudadad/Projects/asyncapi/glee/dist/lib/functions.js:107:73
    at Array.forEach (<anonymous>)
    at file:///Users/khudadad/Projects/asyncapi/glee/dist/lib/functions.js:105:111
    at Generator.next (<anonymous>)
    at fulfilled (file:///Users/khudadad/Projects/asyncapi/glee/dist/lib/functions.js:4:58)

and I have to specify the server even if there is only one server:

{
   send: [{
      server: 'websockets',
      payload: 'my message'
  }]
}

If this was intentional, we need to update the docs and show better error messages.
I think we need to implement some kind of fallback to the default server if there is only one server. 🤔

cc: @Souvikns

@KhudaDad414 KhudaDad414 added the bug Something isn't working label Dec 23, 2022
@Souvikns
Copy link
Member

when you do send you have to specify the server name, but when you use reply you do not need to pass the server name.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.21.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants