Debugging Guide#

Welcome to the ParityVend Debugging Guide! This resource is designed to help you resolve any errors or challenges you might encounter while integrating ParityVend or working with its API. Whether you’re new to ParityVend or a seasoned user, this guide provides valuable insights and practical tips to ensure a smooth and efficient experience.

This guide is structured to provide clear and concise explanations of all error messages returned by the ParityVend API, along with actionable debugging tips and helpful resources. We’ll cover everything from API key issues and quota limitations to unauthorized access and testing mode secrets.

ParityVend API: Error responses#

ParityVend API error messages are crafted for clarity and consistency. You’ll always encounter the exact responses documented here, empowering you to pinpoint issues with ease. Every error follows a structured format:

  • "status": Always set to "error", leaving no room for ambiguity.

  • "error_name": A unique identifier for the specific issue encountered.

  • "error_msg": A concise explanation of the error, paired with a helpful link to ParityVend’s documentation for further context.

ParityVend’s error-response system prioritizes clarity and ease of use. Consistent formatting and detailed explanations ensure a quick understanding of errors. Embedded documentation links streamline troubleshooting. The responses always match documented examples, instilling confidence in API interactions and debugging.

ParityVend prioritizes user-friendliness. Doc links within error messages provide direct access to relevant resources, eliminating separate searches. This focus on clarity and structure fosters a smooth development experience.

To handle errors effectively, familiarize yourself with documented error codes and explanations. Implement robust error-handling mechanisms and leverage ParityVend’s comprehensive documentation. By utilizing these features, you can approach API development with confidence, knowing you have the tools to navigate any challenges.


incorrect_request#

“incorrect_request” error response#
{"status": "error", "error_name": "incorrect_request", "error_msg": "Incorrect or invalid fields. View more information: https://www.ambeteco.com/ParityVend/docs/debugging_guide.html#incorrect_request"}

This error is returned when the request to the endpoint either does not have the required arguments, or the arguments are malformed.

Debugging Tips#

To debug and resolve this issue, you need to ensure that the input arguments are presented and valid for the given endpoint.

  • Refer to the API Reference to find information about the required arguments for the given endpoint and their format or type. Check if the arguments you provide to the endpoint are valid and follow the format as described in the API Reference.

  • Check if there are any typos in the URL or arguments. For example, trailing spaces, double slashes, or any other accidental typos or mistakes.

    • Example of a double slash mistake: example//double-slash instead of the correct example/double-slash

    • Example of a space mistake: example/ api-key/ instead of the correct example/api-key/


api_key_invalid#

“api_key_invalid” error response#
{"status": "error", "error_name": "api_key_invalid", "error_msg": "This API key does not exist or is invalid. Please change your API key. View more information: https://www.ambeteco.com/ParityVend/docs/debugging_guide.html#api-key-invalid"}

This error is returned when the API key you provided to the endpoint either does not exist or is invalid.

Debugging Tips#

To debug and resolve this issue, you need to ensure that the API key you provide is valid.

  • Refer to the API Reference to find information about the required API key for the given endpoint. Check if the endpoint needs a private_key or a public_key.

  • Check if you use the correct API key. Refer to the “Access API keys” section to learn how to access API keys for your project.

  • Check if there are any typos in the API key or URL. For example, trailing spaces, double slashes, or any other accidental typos or mistakes.

    • Example of a double slash mistake: example//double-slash instead of the correct example/double-slash

    • Example of a space mistake: example/ api-key/ instead of the correct example/api-key/


over_quota#

“over_quota” error response#
{"status": "error", "error_name": "over_quota", "error_msg": "Your account has exceeded the quota. Upgrade your billing plan to continue. View more information: https://www.ambeteco.com/ParityVend/docs/debugging_guide.html#over-quota"}

This error is returned when your ParityVend account has exceeded the quota. To fix this, upgrade your plan to get more quota, or contact our sales team to discuss a custom plan that fits your needs.

Hint

You can use the get-quota-info endpoint to get up-to-date information about your account’s quota. Refer to the API reference for more information.


not_identifed#

“not_identifed” error response#
{"status": "error", "error_name": "not_identifed", "error_msg": "No country was found for the given IP. View more information: https://www.ambeteco.com/ParityVend/docs/debugging_guide.html#not-identifed"}

This error is returned when the ParityVend API is not able to identify the country of the given IP address. If you believe that this is a mistake, feel free to contact us so that we can include any absent IP addresses in the ParityVend’s database.

Note

This error is only returned by the get-country and get-country-from-ip endpoints.


unauthorized#

“unauthorized” error response#
{"status": "error", "error_name": "unauthorized", "error_msg": "This website domain is not authorized for use with the API key you provided. View more information: https://www.ambeteco.com/ParityVend/docs/debugging_guide.html#unauthorized"}

The unauthorized error occurs when an unauthorized website’s domain is used to access the ParityVend API. This error message is displayed when attempting to use the ParityVend API from a different website than the one authorized for the specific ParityVend project. For instance, if you have set up a ParityVend project for “example.com” and try to utilize the ParityVend API from another website, such as “other.com,” this error will be returned. ParityVend’s security systems are designed to block such requests and generate this error message.

Debugging Tips#

To assist you in debugging and resolving the issue you are encountering, please consider the following points:

  • If you encounter this error while attempting to debug or test our project, we recommend referring to the “Testing Mode” guide. This guide provides a comprehensive overview of how to test your ParityVend API integration in a local development environment. Detailed instructions and best practices are provided to facilitate a smooth testing experience. You can find this guide in the documentation by following the “ParityVend Testing Mode” link.

  • If you encounter this error in a production environment, it is crucial to verify that the domain you entered when setting up the ParityVend project is correct. Ensure that the domain you plan to use for the ParityVend API, such as “mywebsite.com”, precisely matches the domain specified in the project settings. To gain further insights, consult the “New project: Step #1” section, which contains additional information on how to correctly configure the domain settings.

  • To gain a deeper understanding of the underlying processes and mechanisms at play, we recommend reading the “Advanced: Understanding Origin Checking” section. This section provides detailed insights into how origin checking works within ParityVend. By familiarizing yourself with this information, you can enhance your troubleshooting abilities and effectively resolve issues related to origin checking.


invalid_testing_secret#

“invalid_testing_secret” error response#
{"status": "error", "error_name": "invalid_testing_secret", "error_msg": "This testing secret is invalid. Please make sure your testing mode secret is correct. View more information: https://www.ambeteco.com/ParityVend/docs/debugging_guide.html#invalid-testing-secret"}

This error is returned when you are using the ParityVend Testing Mode and the testing_secret parameter is invalid or absent.

Debugging Tips#

To debug and resolve this issue, you need to ensure that the testing_secret you provide is valid.

  • Refer to the ParityVend Testing Mode to learn more about the testing_secret.

  • Check if you use the correct testing_secret. Refer to the “Access API keys” section to learn how to access the testing secret for your project.

  • Check if there are any typos in the testing secret or URL. For example, trailing spaces, double slashes, or any other accidental typos or mistakes.

    • Example of a double slash mistake: example//double-slash instead of the correct example/double-slash

    • Example of a space mistake: example/ api-key/ instead of the correct example/api-key/