From the course: Building Real-Time Web Apps with Spring Boot and WebSockets
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Handling errors
From the course: Building Real-Time Web Apps with Spring Boot and WebSockets
Handling errors
- [Instructor] Because errors are pretty common in any app development, we should spend a little time talking about some common errors that you will encounter while working on your server side WebSocket code. In our lesson about configuring the message broker component, I promise to come back later and explain why you'd want to specify with SockJS as part of registering your endpoints. It will help to first know what SockJS is though. SockJS is a cross-browser JavaScript library. We're gonna be using the SockJS library to get us the use of a WebSocket like object in our JavaScript code. One of the big benefits to using this library is it's cross-browser implementation. Meaning, it provides for the polling style communications in the event that a users browser does not support the WebSocket protocol. It's helpful to let our server side code know to anticipate and also support the fallback plan. There's also some other common error handling you should be aware of. So let's turn our…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.