Handling errors properly is essential in building a robust application in Angular. Error handlers provide an opportunity to present friendly information to the user and collect important data for development. In today’s age of advanced front-end websites, it’s more important than ever to have an effective client-side solution for error handling.
An application that does not handle errors gracefully leaves its users confused and frustrated when the app suddenly breaks without explanation. Handling these errors correctly across an application greatly improves user experience. Collected data from the error handling can inform the development team about important issues that slipped past testing. This is why monitoring tools like Rollbar are so important.
In this article, we will compare several solutions for error handling in Angular apps. First, we will describe the traditional approaches using
HttpClient. Then, we will show you a better solution using
HttpInterceptor. We’ll also show you how to use this interceptor to monitor and track errors centrally in Rollbar.
Source: Error Handling with Angular 8 – Tips and Best Practices
One-liner, cross platform, doesn’t look like the cat slept on your keyboard:
npx git-removed-branches (dry-run) or
npx git-removed-branches –prune (removes for real).
You need to already have node.js installed.
Source: git – How to prune local tracking branches that do not exist on remote anymore – Stack Overflow
You can decide how SQL-Developer display date and timestamp columns.
- Go to the “Tools” menu and open “Preferences…”
- In the tree on the left open the “Database” branch and select “NLS”
- Now change the entries “Date Format”, “Timestamp Format” and “Timestamp TZ Format” as you wish!
ISO formated output with date and time
- Date Format: YYYY-MM-DD HH24:MI:SS
- Timestamp Format: YYYY-MM-DD HH24:MI:SSXFF
- Timestamp TZ Format: YYYY-MM-DD HH24:MI:SSXFF TZR
Source: SQL-Developer: How to change the date format of the result grid – “Why does my date column have no time?” | Oracle Deli
RepoZ RepoZ is a zero-conf git repository hub with Windows Explorer- & CLI-enhancements. It uses the git repositories on your machine to create an efficient navigation widget and makes sure you’ll never lose track of your work along the way. It’s populating itself as you work with git. It does not get in the way and does not require any user attention to work. RepoZ will not compete with your favourite git clients, so keep them. It’s not about working within a repository: It’s a new way to use all of your repositories to make your daily work easier.
Keyboard shortcut in windows: Ctrl+Alt+R.
Runs as a taskbar application in Windows.
Source: awaescher/RepoZ: A zero-conf git repository hub for Windows and macOS with Windows Explorer- & CLI-enhancements
How to read request body in a asp.net core webapi controller?
A clearer solution, works in ASP.Net Core 2.1 / 3.1
// For ASP.NET 2.1
// For ASP.NET 3.1
public class ReadableBodyStreamAttribute : AuthorizeAttribute, IAuthorizationFilter
public void OnAuthorization(AuthorizationFilterContext context)
// For ASP.NET 2.1
// For ASP.NET 3.1
In an Controller
public string SomePostMethod()
//Note: if you're late and body has already been read, you may need this next line
//Note2: if "Note" is true and Body was read using StreamReader too, then it may be necessary to set "leaveOpen: true" for that stream.
using (StreamReader stream = new StreamReader(HttpContext.Request.Body))
string body = stream.ReadToEnd();
// body = "param=somevalue¶m2=someothervalue"
Source: c# – How to read request body in a asp.net core webapi controller? – Stack Overflow
Right click on an XSD file, choose “Open with…” and select the appropriate option – then click on “Set as Default” before you actually open it.
Source: Stop Visual Studio 2010 opening XSDs in design mode – Stack Overflow
Got this error when building a .NET framework (version 4.6.1) solution containing multiple projects:
The type 'HttpResponseMessage' exists in both 'System.Net.Http, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Net.Http, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Install System.Net.Http version 4.0.0 as nuget package to the “failing project”.
Added this to the “failing” project app.config file:
<!-- other dependentAssembly bindings here -->
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-184.108.40.206" newVersion="220.127.116.11" />
Updated the “failing” projects .csproj file like this:
Removed this line or similar for System.Net.Http:
<!--<Reference Include="System.Net.Http, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />-->
Added “hintpath” with projects relative path to the nuget packages.
In my example its 3 level up and then down (..\..\..) you might need to adjust to your projects folderstructure.
<Reference Include="System.Net.Http, Version=4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
// A class that contains MSTest unit tests. (Required)
public class YourUnitTests
public static void AssemblyInit(TestContext context)
// Executes once before the test run. (Optional)
public static void TestFixtureSetup(TestContext context)
// Executes once for the test class. (Optional)
public void Setup()
// Runs before each test. (Optional)
public static void AssemblyCleanup()
// Executes once after the test run. (Optional)
public static void TestFixtureTearDown()
// Runs once after all tests in this class are executed. (Optional)
// Not guaranteed that it executes instantly after all tests from the class.
public void TearDown()
// Runs after each test. (Optional)
// Mark that this is a unit test method. (Required)
public void YouTestMethod()
// Your test code goes here.
Source: Most Complete MSTest Unit Testing Framework Cheat Sheet
This error occurs for instance if you are on a protected company network. Fix: go to settings -> Proxy ->
check “This proxy requires authentication”
set your AD Windows username and password here.
Uncheck “Use the system proxy”