AT.Core.Exceptions
1.4.0
dotnet add package AT.Core.Exceptions --version 1.4.0
NuGet\Install-Package AT.Core.Exceptions -Version 1.4.0
<PackageReference Include="AT.Core.Exceptions" Version="1.4.0" />
<PackageVersion Include="AT.Core.Exceptions" Version="1.4.0" />
<PackageReference Include="AT.Core.Exceptions" />
paket add AT.Core.Exceptions --version 1.4.0
#r "nuget: AT.Core.Exceptions, 1.4.0"
#:package AT.Core.Exceptions@1.4.0
#addin nuget:?package=AT.Core.Exceptions&version=1.4.0
#tool nuget:?package=AT.Core.Exceptions&version=1.4.0
AT.Core.Exceptions
Este nuget administra de manera centralizada las excepciones generadas en el Back End
Getting Started
- Proceso de instalación
- Excepciones disponibles
- Creditos
⚙️ Proceso de instalación:
Instale el nuget usando el siguiente comando.
.NET Cli
dotnet add package AT.Core.Exceptions --version 1.4.0
Nuget
NuGet\Install-Package AT.Core.Exceptions -Version 1.4.0
Package reference
<PackageReference Include="AT.Core.Exceptions" Version="1.4.0" />
🧯 Excepciones disponibles
Todas heredan de ExceptionBase y llevan el codigo HTTP con el que debe responder la API.
| Excepcion | HTTP | IsManagedException |
|---|---|---|
BadRequestException |
400 | true |
UnauthorizedException |
401 | true |
ForbiddenException |
403 | true |
NotFoundException |
404 | true |
InternalServerErrorException |
500 | false |
NotImplementedException |
501 | false |
BadGatewayException |
502 | false |
GatewayTimeoutException |
504 | false |
Que significa IsManagedException
Distingue un error que el cliente provoco de un fallo del servicio, y el manejador global
de AT.BackEnd.Api la usa para decidir cuanto detalle devuelve:
true— error esperado. La respuesta lleva solo el mensaje.false— fallo del servicio. La respuesta puede incluir el stack trace, y solo fuera de produccion: en produccion el detalle queda unicamente en el log.
Al crear una excepcion nueva hay que fijar el valor de forma explicita. Es un bool, asi que
omitirlo la deja en false y una validacion de negocio terminaria exponiendo detalle interno.
Cambio en 1.4.0 —
BadRequestExceptionyForbiddenExceptionno fijaban el valor y quedaban enfalse, asi que las respuestas 400 y 403 incluian el stack trace. Ahora sontrue. Si algun consumidor dependia de recibir el trace en un 400, deja de recibirlo.
🎓 Créditos
Nombre del Paquete: AT.Core.Exceptions Versión: 1.4.0
Autor
- Nombre: Dayser José Granados Pineda
- Correo Electrónico: djpgranados@gmail.com | daysergranados@hotmail.com
Licencia
Este paquete está bajo la licencia MIT License
Copyright (c) 2025 Dayser José Granados Pineda
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE..
Contacto
Si tienes comentarios, problemas o solicitudes, ¡no dudes en ponerte en contacto conmigo!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AT.Core.Exceptions:
| Package | Downloads |
|---|---|
|
AT.BackEnd.Application.CQRS
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
BadRequestException y ForbiddenException pasan a IsManagedException = true: las respuestas 400 y 403 dejan de incluir el stack trace.