0

I am getting the below error. Can someone please help with this? I am trying to integrate a big blue button in nodejs but it's throwing an error. Can someone please provide me any reference links to integrate the big blue button in angular/node?

const bbb = require('bigbluebutton-js')
// var http = require('http')

let api = bbb.api(
 `http://test-install.blindsidenetworks.com/bigbluebutton/api`, 
 '8cd8ef52e8e101574e400365b55e11a6'
)
let http = bbb.http

let meetingCreateUrl = api.administration.create('My Meeting', '1', {
  duration: 2,
  attendeePW: 'secret',
  moderatorPW: 'supersecret',
})
 
// http method should be used in order to make calls
http(meetingCreateUrl).then((result) => {
  console.log(result)
 
  let moderatorUrl = api.administration.join('moderator', '1', 'supersecret')
  let attendeeUrl = api.administration.join('attendee', '1', 'secret')
  console.log(`Moderator link: ${moderatorUrl}\nAttendee link: ${attendeeUrl}`)
 
  let meetingEndUrl = api.administration.end('1', 'supersecret')
  console.log(`End meeting link: ${meetingEndUrl}`)
})
(node:4590) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
    at createError (/Users/smrentachintala/Documents/node/bigBlueButton/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/smrentachintala/Documents/node/bigBlueButton/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/Users/smrentachintala/Documents/node/bigBlueButton/node_modules/axios/lib/adapters/http.js:236:11)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1143:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:4590) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:4590) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
DreamBold
  • 2,727
  • 1
  • 9
  • 24

1 Answers1

0

you have to catch the error. can you please try this one :

http(meetingCreateUrl).then((result) => {
  console.log(result)
 
  let moderatorUrl = api.administration.join('moderator', '1', 'supersecret')
  let attendeeUrl = api.administration.join('attendee', '1', 'secret')
  console.log(`Moderator link: ${moderatorUrl}\nAttendee link: ${attendeeUrl}`)
 
  let meetingEndUrl = api.administration.end('1', 'supersecret')
  console.log(`End meeting link: ${meetingEndUrl}`)
}).catch( error => {
   console.log(error.message);
});

Thameur Daly
  • 219
  • 2
  • 12