Customizing Errors in Node.js
Javascript's built in Error provides useful information, but can often feel lacking in clarity. One-size-fits-all is great for the language, but we can do better in our own apps. That's where custom errors come in.
Javascript's built in Error provides useful information, but can often feel lacking in clarity. One-size-fits-all is great for the language, but we can do better in our own apps. That's where custom errors come in.
Working on the web means coming into contact with HTTP responses. Whether you spend your time primarily on the client or on the server, you're likely familiar with the popular ones like 200, 404, and 500. While memorizing all the codes using cat memes as a mnemonic can be helpful, let's dive deeper into what some of the most common codes mean.
Welcome to Part 2 in our series on building your own circuit breaker in Node.js. In Part 1, Building a Circuit Breaker in Node.js, we built a starter version that handles the core states of a circuit breaker. In this article, we will add configurability, manual overrides, and fallback request support. You can find the complete code for each example here.
Trouble choosing an HTTP client for your Ruby project? We've got you covered. To help with the decision making, here is a list of the most popular and interesting libraries in the space. We've also included examples of making a request in each, and some reasons each library might be of interest to you and your project.
Today, we have sent out our monthly newsletter with a short recap of the latest updates on Bearer.sh. Here's an abstract of what we shared - if you haven't joined the newsletter yet, subscribe at the end of this article.
Circuit breakers were originally designed to protect electrical circuits from damage. Software development has adopted the concept as a type of resiliency pattern and it can now be found commonly in the cloud-native and microservices stacks. They can also be valuable in any codebase that needs to offer more flexibility, especially when relying on third-party APIs. Welcome to Part 1 of this two part series on building a circuit breaker in Node.js.
Have you ever been building an application and thought: "I can make requests to this service's API, but is there a way for them to let my app know when X happens? You could try calling the API on a set interval. Take the response, compare it to the last, and go from there. This is polling, but it is inefficient and can be an easy way to hit rate limits. Instead, some APIs and services offer what's known as a webhook. Instead of contacting them, they contact you.
In our previous post on API Gateways we discussed how services handle external client to service(North-South) traffic. When it comes to dealing with service to service(East-West) traffic it is common to implement a Service Mesh.
What's a gateway? It is an entry point. Things go in. People, traffic, requests. If you've spent any time with microservices, you may have come across the term "API gateway". While not unique to microservices, the API gateway's popularity has grown in the time since their rise. So what exactly is an API gateway?
Bearer's co-founders Guillaume and Cédric are big advocates for remote work. Both have written about the advantages and challenges in the past on the Bearer Blog, but today I want to share some thoughts from our team on what it's like working for a distributed, fully remote company. A few main trends came up. Some expected, and a few surprising.