All Questions
Tagged with exceptions rest
11 questions
0
votes
2
answers
603
views
Explain why it's bad to use a middleware to coat error messages as exceptions
We manage a backend application behind a FastAPI REST controller with multiple endpoints.
A member of our team decided to use a middleware on the application which parses the body of the response for ...
0
votes
3
answers
180
views
Communicating error conditions in client API for remote RESTful server, what's the best way?
I'm writing an application based on a RESTful API located in a server (written in Python).
An Android app will access the API endpoints to get, post, put or delete data. The usual.
The server has a ...
3
votes
4
answers
7k
views
Check if resource exists before inserting to the database or wait until the DAO throw the Exception?
I have two paths:
/students
/students/{id}/addresses
...with the following behavior:
POST to /students - 201 Created (if successfully created the Student)
POST to /students/{id}/addresses - 201 ...
1
vote
1
answer
287
views
Best way to manage services and exceptions
I have a mobile app who consumes a api service. I have a class to manage all the operations (get, post, put) who throws exceptions if the result is not 200.
The app was originaly designed to be ...
-1
votes
1
answer
3k
views
Spring Exception Handling. Custom exception per Http status?
I'm just designing the exception handling for the REST interface on our Spring server.
As we will have multiple REST controllers, a central exception handling is desired. Spring offers the solution ...
-1
votes
1
answer
63
views
Handling RuntimeExceptions thrown from Services and Libraries
I am working on a ReST based service which calls other ReST based services and also deals with Persistence in a database. So a typical call might look like
Get some data from the database.
Make a call ...
11
votes
2
answers
13k
views
REST: How to determine transient exceptions?
As I try to deal with the possibility of failure when I invoke RESTful endpoints or in general any HTTP endpoint I've been wondering if there is any standard or pattern in the HTTP specification or in ...
1
vote
2
answers
106
views
Should a client check for persisted item existence before modifying it?
I'm developing a MVC Web application with a REST interface.
The REST controller performs actions on persisted items through a service class, which translates exceptions coming from the persistence ...
6
votes
2
answers
7k
views
Best practice to handle POST with array of objects if at least one object raise an Exception
I want to POST an array of objects and make an insertion in database concerning each of them.
What is the best practice if one object does not conform and raise an Exception? (cancel all transactions ...
0
votes
5
answers
2k
views
Handling DomainExceptions using REST endpoint
Suppose I'm doing some DDD.
Now, I have a microservice reflecting a bounded context/a part of a bounded context.
Now, suppose there is a REST endpoint:
'/somedomainmodel/someaction'
My API user is ...
1
vote
2
answers
647
views
Should I Aggregate Web API Errors?
The Situation
We are writing a REST API that performs validation up-front.
The code is written such that it tries to find as many errors as possible.
However, each error might correspond to a ...