Error handling

In this section, we are going to talk about how to handle errors in DynamoDB. We have seen how to make client requests in earlier chapters of this book. There, we had not put the error-handling mechanism, which we would be doing now.

Type of errors

There are two types of errors in AWS:

  • Client errors: These normally come when the request we are submitting is incorrect. The client errors are normally shown with the status code starting with 4XX. These errors normally arrive when there is an authentication failure, bad requests, missing required attributes, or for exceeding the provisioned throughput. The errors normally come when users provide invalid inputs.
  • Server errors: These arrive when there is something wrong from Amazon's side, ...

Get Mastering DynamoDB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.