Errors and Troubleshooting

All supported errors that you may unfortunately encounter while using Whisk API.

General Errors

Here is the list of common errors that you may receive while using any of our API services:

400: Bad Request

{
"code":"general.badRequest","message":"Invalid date: GrpcDate(2020,3,128)"
}

This failed response appears when error codes are found in the endpoint query. The possible error codes that may appear are:

Error Code

Description

Troubleshooting

general.badRequest

This error code appears when there is invalid data format found in the request.

Check your request headers and parameters to fix the data formatting issue.

general.notFound

This error code appears when an ID of a resource specified in the API request is not found.

  • Check if the ID is correct.

  • Check if the resource still exists.

401: Unauthorized

{
"code":"auth.tokenNotFound"
}

This failed response appears due to API authentication failure. The possible error codes that may appear are:

Error Code

Description

Troubleshooting

auth.tokenExpired

This error code appears when the authentication token in use has expired.

This error usually occurs due to one of the following:

  • TTL is greater than 24 hours

  • Token is not yet valid or already expired

auth.tokenRequired

This error code appears when you forget to use an authentication token in your API request.

Specify the token in the Authorization header, or use it as a query parameter in the request URL.

  • auth.tokenNotFound

  • oauth.unauthorized

The auth.tokenNotFound or oauth.unauthorized error usually occurs due to one of the following reasons:

  • The token currently in use got deleted when:

    • the user logged out.

    • the app used the refresh token connected to the access token.

  • All (user, application) pair tokens got deleted when:

    • the user somehow unlinked the whisk account from the client app.

  • All user tokens got deleted when:

    • the user changed the password.

    • the user reset the password.

    • the user used the auth code.

    • the user deleted the whisk account.

Regenerate or request a new token.

403: Bad Request

{
"code": "authorization.scopeRequired"
}

This failed response appears when the request is formed and authenticated correctly, but the API refuses to accept it due to insufficient permission. The possible error codes that may appear are:

Error Code

Description

Troubleshooting

authorization.denied

This error code appears when your token has insufficient permission to access a resource.

You may be using the wrong or a different token. Try again with a user access token.

authorization.scopeRequired

This error code appears when the authorization token is missing a specific scope that is needed to access a resource.

Regenerate or request a new token with the required scopes.

500: Internal Server Error

This is unexpected response, something is wrong on our side, please contact: help@whisk.com

This failed response appears when something is not right on Whisk's end. Please send a message to help@whisk.com, and be sure to include both the Request and Response data. We’ll get back to you soon.

Unique Errors

Here is the list of errors you may only receive while using specific API services:

COMMUNITY_ERROR_TOPIC_NOT_FOUND

Description

API Services

Troubleshooting

This error appears when you try to read a topic's data but the topic can't be found.

Get communities from a topic.

  • Check if the topic_id used in the API request is correct.

  • Check if the topic still exists on Whisk and has not been deleted.

COMMUNITY_ERROR_NOT_FOUND

Description

API Services

Troubleshooting

This error appears when you try to read a community's data but the community can't be found.

  • Check if the community_id used in the API request is correct.

  • Check if the community still exists on Whisk and has not been

COMMUNITY_ERROR_RECIPE_ALREADY_ADDED

Description

API Services

Troubleshooting

This error appears when you try to add recipes that already exist in the community.

Add recipes to a community.

Search for the recipe inside the community on Whisk as it may already exist there. If you don't find it there, then check if the recipe ID you used in your API request belongs to the recipe you wanted to add to the community.

COMMUNITY_ERROR_ALREADY_COMMUNITY_MEMBER

Description

API Services

Troubleshooting

This error appears when you try to join a community but you're already member of it.

Join a community.

Search for the community on Whisk and check if you are already a member there. If it shows you a button join the community, then check the community ID you used in your API request as it may belong to a different community.

COMMUNITY_ERROR_NOT_A_COMMUNITY_MEMBER

Description

API Services

Troubleshooting

This error appears when you try to leave a community but you're not a member of it.

Leave a community.

Search for the community on Whisk and check if it shows you a button join the community as may not have join it. If shows that you're already a member of it then check the community ID you used in your API request as it may belong to a different community.

LIST_ERROR_NOT_FOUND

Description

API Services

Troubleshooting

This error appears when you try to read a shopping list's data but the shopping list can't be found.

  • Check if the shopping list id used in the API request is correct.

  • Check if the community still exists on Whisk and has not been deleted.

LIST_ERROR_RECIPE_UNAVAILABLE

Description

API Services

Troubleshooting

This error appears when you try to read a recipe's data to add items to the shopping list but the recipe can't be found.

Create a shopping list.

  • Check if the recipe_id used in the API request is correct.

  • Check if the recipe still exists on Whisk and has not been deleted.

LIST_ERROR_ITEM_NOT_FOUND

Description

API Services

Troubleshooting

This error appears when you try to read an item from a shopping list but the item can't be found.

  • Move items from one shopping list to another.

  • Delete an item from a shopping list.

  • Update an item in a shopping list.

  • Check if the item_id used in the API request is correct.

  • Check if the item still exists in the shopping list and has not been deleted.

LIST_ERROR_CAN_NOT_DELETE_PRIMARY

Description

API Services

Troubleshooting

This error appears when you try to delete a shopping list but it can't be deleted since you have set it as your primary shopping list.

Delete a shopping list.

Try setting some other shopping list as primary and try again.

MEAL_PLAN_ERROR_INVALID_PERIOD

Description

API Services

Troubleshooting

This error appears when you try to generate a meal plan for an incorrect period of time.

Check if the period attribute used in the request is correctly specified. The correct format can be found in the related endpoint description topic.

MEAL_PLAN_ERROR_NOT_FOUND

Description

API Services

Troubleshooting

This error appears when you try to read a meal plan's data but the meal plan can't be found.

  • Check if the meal_plan_id used in the API request is correct.

  • Check if the meal plan still exists on Whisk and has not been deleted.

MEAL_PLAN_ERROR_SLOT_NOT_FREE

Description

API Services

Troubleshooting

This error appears when you try to add or update a meal in a meal plan but the requested slot is already occupied by another meal.

  • Check if the requested slot is correct.

  • Clear the slot and try again.

MEAL_PLAN_ERROR_DAY_LIMIT_EXCEEDED

Description

API Services

Troubleshooting

This error appears when you exceed the number of meals allowed in a day.

Check if you already have 7 meals, which is the maximum number of meals you can have set for the day.

MEAL_PLAN_ERROR_MEAL_NOT_FOUND

Description

API Services

Troubleshooting

This error appears when you try to read or edit a meal in a meal plan but the meal can't be found.

  • Check if the meal_id used in the API request is correct.

  • Check if the meal still exists in the meal plan and has not been deleted.

MEAL_PLAN_ERROR_INVALID_SETTINGS

Description

API Services

Troubleshooting

This error appears when you try to write meal plan settings for generating or updating a meal plan but the data specified is incorrect.

MEAL_PLAN_ERROR_WEEK_LIMIT_EXCEEDED

Description

API Services

Troubleshooting

This error appears when you exceed the number of meals allowed in a week.

Modify a batch of meals.

Check if you already have 50 meals, which is the maximum number of meals you can have set for the week.

RECIPE_ERROR_BAD_REQUEST

Description

API Services

Troubleshooting

This error appears when your request contains incorrect parameters.

Check the Recipe API documentation to see if your API request is correctly formed.

RECIPE_ERROR_ALREADY_EXISTS

Description

API Services

Troubleshooting

This error appears when you try to add a recipe but the recipe already exists.

Create or update a recipe.

You maybe adding a recipe that already existing

RECIPE_ERROR_NOT_FOUND

Description

API Services

Troubleshooting

This error appears when you try to read or edit a recipe's data but the recipe can't be found.

  • Check if the recipe_id or recipe URL used in the API request is correct.

  • Check if the recipe still exists and has not been deleted.

STORE_ITEM_ERROR_BAD_REQUEST

Description

API Services

Troubleshooting

This error appears when you try to read store items data but your request contains incorrect parameters.

Get store items.

Check the Store API documentation to see if your API request is correctly formed.