Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Full-Stack Web Development with ASP.NET Core

You're reading from   Hands-On Full-Stack Web Development with ASP.NET Core Learn end-to-end web development with leading frontend frameworks, such as Angular, React, and Vue

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781788622882
Length 478 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Amir Zuker Amir Zuker
Author Profile Icon Amir Zuker
Amir Zuker
Tamir Dresher Tamir Dresher
Author Profile Icon Tamir Dresher
Tamir Dresher
Shay Friedman Shay Friedman
Author Profile Icon Shay Friedman
Shay Friedman
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Becoming a Full-Stack .NET Developer FREE CHAPTER 2. Setting Up Your Development Environment 3. Creating a Web Application with ASP.NET Core 4. Building REST APIs with ASP.NET Core Web API 5. Persisting Data with Entity Framework 6. Securing the Backend Server 7. Troubleshooting and Debugging 8. Getting Started with Frontend Web Development 9. Getting Started with TypeScript 10. App Development with Angular 11. Implementing Routing and Forms 12. App Development with React 13. App Development with Vue 14. Moving Your Solution to the Cloud 15. Deploying to Microsoft Azure 16. Taking Advantage of Cloud Services 17. Other Books You May Enjoy

Responding gracefully in the event of errors and exceptions


In a classic application development, where the caller of your method runs in the same process as your logic, it's obvious that when an error occurs, the code will either throw an exception or return an error code of some type.

In a Web API application, we strive to get the same semantic, only that the caller doesn't run in the same process, and therefore, the error response should be serialized on the wire. HTTP already provides the notion of status code, which allows you to communicate to the caller if the request was processed successfully or not. Unfortunately, in many cases, this is not enough, and the users of your API are unable to understand exactly what the problem is by only looking at a single generic status code. Instead, it's better to provide a standard error object with finer details.

Adding a correlation identifier to responses

Not all application errors will result in an error response — there are times when the application...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime