From b94daa2d53933021b06d065c8408e613a7e81fb1 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 15:14:30 +0000 Subject: [PATCH] style: Format code with rubocop, prettier, standardrb and standardjs --- docs/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index 2c13a3e..beeff57 100644 --- a/docs/api.md +++ b/docs/api.md @@ -24,11 +24,11 @@ We have a method [paginated_collection()](../app/controllers/api/v1/base_control ## Error Codes -The method [handle\_api_error](../app/controllers/api/v1/base_controller.rb) takes care of rendering the error responses. +The method [handle_api_error](../app/controllers/api/v1/base_controller.rb) takes care of rendering the error responses. 1. Unauthorized - Happens when API key/token is invalid or if the user is not authorized(pundit) to access the endpoint. 2. Forbidden - This error will not be thrown for the most part. It is only thrown if there is no record to check for authorization(pundit). 3. Unprocessable Entity - This error is thrown if an unconfirmed user tries to sign in or if an API call to update a user record fails. A detailed message with the error is also provided. 4. Internal Server Error - This type of error is due to some method breaking and is not desired. It should be handled gracefully if observed. -The methods for rendering the above errors can be found in the [BaseController](../app/controllers/api/v1/base_controller.rb). They can be passed a message to be rendered along with the error response. \ No newline at end of file +The methods for rendering the above errors can be found in the [BaseController](../app/controllers/api/v1/base_controller.rb). They can be passed a message to be rendered along with the error response.