Postman is a powerful tool for testing and working with APIs. In this blog post, I will describe some Postman tips for better API testing that I have used for quite some time and have helped tremendously.
Continue readingCalling and Authenticated API from Next.js Server Side
Calling an authenticated API from Next.js server side is a little different than calling it from the client side and concerning authentication cookies.
Continue readingMocking External APIs or services in .NET
Whether calling the external API costs money or mocking desired behavior to code specific business rules. Sometimes external APIs could be mocked during the development of services or APIs. I believe this is an important strategy in every developer’s toolbox.
Continue reading.NET Global Exception Handler to Return Problem Details For Your APIs
This article will focus on handling custom exceptions for flow control on .NET with a global exception handler and return a problem details object.
Having said that. There are, for the most part, two schools of thought. One where it is OK to throw a (custom) exception to control flow. i.e. Throw a UserNotFoundException
when a user is not found. The second is implementing the Result Pattern where you return a Success or an Error to control the flow. i.e. Result.UserNotFound
.
Run Load (Performance) Testing with Postman
I recently found Postman has built-in capability to run load (performance) testing. Some use cases to run load testing are identifying bottlenecks, latency, and failures on your API when calling at near production scale.
Continue readingConfigure CORS in .NET
We need to configure CORS in .NET (or really in any other language) when an application’s front-end and back-end are being served from different domains, aka origins. And more than likely, during development, both the front-end and back-end will be running from different ports on localhost.
Continue reading.NET Core Options Pattern For Live Reload Settings
There are many great posts about implementing the Options Pattern .NET Core with IOptionsMonitor on the interwebs, but many fail to point out one “gotcha” when working with IOtionsMonitor
to live reload settings.
Solved: GraphQL and Hot Chocolate Workshop issues with the latest versions of Hot Chocolate and .NET Top-Level Statements
I started working on the official “Getting started with GraphQL on ASP.NET Core and Hot Chocolate – Workshop” tutorial, but since the workshop is a bit outdated, it targets .NET 5 and an older version of Hot Chocolate. I am using the latest .NET 7 (at the time of this writing) and top-level statements. In this post, I will address the issues I ran into due to Hot Chocolate version changes from 11 to 13.
Continue readingFix Synology Photos Not Playing HVEC Videos And Not Reading Taken Timestamp
If you are still running Synology DSM 6 and are looking into migrating to Synology DSM 7, and one of the main Synology apps you use is Photo Station, there are some major changes in how Synology handles photo uploading in the new Synology Photos app.
Continue readingError: Cannot find module ‘gatsby-plugin-utils/polyfill-remote-file’
After updating Gatsby from 3.0.4 to 4.12.1 I got the following error message: Error: Cannot find module 'gatsby-plugin-utils/polyfill-remote-file'
and the stack trace below:
$ NODE_OPTIONS="-r esm" gatsby develop -H 0.0.0.0 -o /Users/esausilva/Development/Projects/andreasilva-design/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53 throw ex; ^ /Users/esausilva/Development/Projects/andreasilva-design/node_modules/gatsby/dist/utils/start-server.js:1 Error: Cannot find module 'gatsby-plugin-utils/polyfill-remote-file' Require stack: - /Users/esausilva/Development/Projects/andreasilva-design/node_modules/gatsby/dist/utils/start-server.js ...Continue reading