-In both of the "successful" cases of deleting a resource, the backend responds with the status code <i>204 no content</i>. The two different cases are deleting a note that exists, and deleting a note that does not exist in the database. The _result_ callback parameter could be used for checking if a resource was actually deleted, and we could use that information for returning different status codes for the two cases if we deem it necessary. Similarly, when sending a PUT request with a non-existent ID, it returns null, but the error isn't caught by the catch block, requiring additional handling. Any other exception that occurs is passed onto the error handler.
0 commit comments