Book Image

Mastering DynamoDB

By : Tanmay Deshpande
Book Image

Mastering DynamoDB

By: Tanmay Deshpande

Overview of this book

Table of Contents (18 chapters)
Mastering DynamoDB
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
8
Useful Libraries and Tools
Index

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, and they appear at runtime. The only way to handle such errors is to try again, and even then if it does not succeed, then you should log the request ID and reach Amazon support with that ID to know more about the details.

You can get the full list...