JavaScript Error Handling and Tracking Tips and Tricks

  Рет қаралды 11,611

James Q Quick

James Q Quick

Күн бұрын

Find better ways to handle and track errors in your JavaScript code!
*SPONSORED BY HIGHLIGHT*
Try Highlight for free - highlight.io/
*DISCORD*
Join the Learn Build Teach Discord Server 💬 - / discord
*STAY IN TOUCH 👋*
Newsletter 🗞 - www.jamesqquick.com/newsletter
Follow me on Twitter 🐦 - / jamesqquick
Check out the Podcast - compressed.fm/
Courses - jamesqquick.com/courses
*QUESTIONS ABOUT MY SETUP*
Check out my Uses page for my VS Code setup, what recording equipment I use, etc. www.jamesqquick.com/uses
*TIMESTAMPS*
00:00 - Intro
01:00 - JavaScript Console Methods (More than just log)
02:50 - Logging in Your Hosting Provider
04:50 - Logtail Addon For Heroku
06:10 - Handling Async Errors in Express.js
09:10 - Highlight.io for Error Tracking and Session Replay
10:30 - Fullstack Error Tracking with Highlight.io
12:10 - Logging in Highlight.io
13:00 - Wrap up

Пікірлер: 20
@codewithguillaume
@codewithguillaume Жыл бұрын
Thanks for this James :)
@waldo-the-developer2376
@waldo-the-developer2376 Жыл бұрын
Love it James, thank you so much. Can you make a video on how to handle your errors in a NextJs project?
@JamesQQuick
@JamesQQuick Жыл бұрын
So glad to hear it! Potentially! For the most part it would be the same idea of making sure to use try/catch and handle that way!
@ChristianKolbow
@ChristianKolbow Жыл бұрын
I have now also tested highlight. Highlight is really awesome. Great tool
@JamesQQuick
@JamesQQuick Жыл бұрын
It's really pretty incredible!
@christopheanfry2425
@christopheanfry2425 Жыл бұрын
Thank you very useful topic!!!
@JamesQQuick
@JamesQQuick Жыл бұрын
Glad you think so!
@user-qw9cj7tg5d
@user-qw9cj7tg5d Жыл бұрын
Can you please help me out with setIntervals. when I use interval to run time. when I shift to new tab and leave the tab in which timer is running inactive for a long time. the timer does not move. is there a way to solve this problem
@Aquatic2005
@Aquatic2005 Жыл бұрын
One way to handle async errors in express is to wrap the async function in a handler so you can dry up the code and not have to write a try catch every time. Place it in a separate file, then import it into your routes. module.exports = func => { return (req, res, next) => { func(req, res, next).catch(next); } } app.get("/example", asyncHandler(async (req, res) => {res.send("Example")}))
@JamesQQuick
@JamesQQuick Жыл бұрын
Yep, that's a good option. The downside is you lack specific logging info if you have one generic handler.
@Aquatic2005
@Aquatic2005 Жыл бұрын
@@JamesQQuick thats true, I forgot to add that you can get specific logging info in express by adding in this with the above async handling example. app.use((err, req, res, next) => { console.log(err); next(); }); Depending on what I need I will render a error page while logging the specific issue app.use((err, req, res, next) => { const { statusCode = 500, message = "Someting Went Wrong, Try Again!" } = err; res.status(statusCode).render("error", { message, statusCode }); console.log(err) next(); }); Good point though, I forgot about the rest of this I usually pair with the aforementioned async handler.
@DeineWebschmiede
@DeineWebschmiede Жыл бұрын
thank you for this video, very informative
@JamesQQuick
@JamesQQuick Жыл бұрын
So glad :)
@redblue8389
@redblue8389 Жыл бұрын
Hello James, I saw your video on code academy about vscode. You said that you use mac version of vs code. I have searched alot about this topic but can't seem to find an answer, do you know anyway of how I can use vscode on mac with Windows functionality?
@JamesQQuick
@JamesQQuick Жыл бұрын
What specific windows functionality are you looking for?
@redblue8389
@redblue8389 Жыл бұрын
@@JamesQQuick most of my friends use Windows so I need a Windows system for projects, any Window would be great, I have a mac m1 air...
@AngelEduardoLopezZambrano
@AngelEduardoLopezZambrano Жыл бұрын
Nice video, very informative! I haven't looked into error handling too deep, this a good starting point. Thanks
@JamesQQuick
@JamesQQuick Жыл бұрын
So glad this helped!
@keeprunning5457
@keeprunning5457 Жыл бұрын
nice man keep em coming jajaja
@elmalleable
@elmalleable Жыл бұрын
Me that just duelled the analytics beast to tag my errors
5 Async + Await Error Handling Strategies
18:11
Wes Bos
Рет қаралды 19 М.
WHY IS A CAR MORE EXPENSIVE THAN A GIRL?
00:37
Levsob
Рет қаралды 17 МЛН
The Worlds Most Powerfull Batteries !
00:48
Woody & Kleiny
Рет қаралды 24 МЛН
How I prepare to meet the brothers Mbappé.. 🙈 @KylianMbappe
00:17
Celine Dept
Рет қаралды 57 МЛН
try, catch, finally, throw - error handling in JavaScript
5:46
freeCodeCamp.org
Рет қаралды 166 М.
JavaScript Error Handling: 5 Things You Aren’t Thinking About!
14:42
Tips and Tricks for Debugging JavaScript
13:03
James Q Quick
Рет қаралды 403 М.
Hate Try...Catch Error Handling in Node.js? Do This Instead
11:47
Exception Handling - Javascript In Depth
41:42
Tech with Nader
Рет қаралды 2,8 М.
I Stopped Using Express.js: Because Bun and Hono 🔥
10:23
Sam Meech-Ward
Рет қаралды 101 М.
Tips For Using Async/Await in JavaScript
16:26
James Q Quick
Рет қаралды 394 М.
Top 5 Async Mistakes for JavaScript Beginners (Don’t make these!)
15:11
¡Maneja los errores de JavaScript como un senior!
23:20
midulive
Рет қаралды 61 М.
WHY IS A CAR MORE EXPENSIVE THAN A GIRL?
00:37
Levsob
Рет қаралды 17 МЛН