Troubleshooting
Having many mocks set up within a single workspace may cause some overlapping of matches. Complex templates/code may also raise some unexpected behavior, like errors thrown during the processing of the request or invalid response content rendered. The primary tools to handle such situations are Workspace Test and Request Log. These tools provide insight into request content, output and order of matching mocks, template logs, dynamic mocks, and response content. In most situations, the provided data helps to solve the issues with matching and response rendering.
Error Outputs
In some situations, the mock consumer may not get the expected response. Instead, the response with a text/plain content-type and an error message is returned. This may happen when SmartMock.io is not able to serve the request due to invalid requests, incorrect mock template/code, exceeded quota, or other internal errors. The following error messages may be returned:
-
Domain not found. Please verify the workspace configuration and try again. - The workspace with the requested subdomain cannot be found. Please verify the workspace exists and that your account is not locked. Try again in 5 minutes. If the problem persists, please contact our support.
-
The monthly request quota exceeded. - Requests can’t be served because the monthly request quota has exceeded. Upgrade your subscription or wait until your quota replenishes at the beginning of the next calendar month. If you have any questions about quota usage, please contact our support.
-
Too many concurrent requests. - The request was not processed because there were other concurrent requests to workspaces belonging to the same account in progress, and the number of these requests was equal to the concurrent request quota for the account. If you have any questions about quota usage, please contact our support.
-
Request body too large. - The request sent by the mock consumer was too large. See the Limits section to check the maximum request size.
-
No matched mocks. - There was no mock matched for the request. Please check the Request Log for more details. You may also test matching logic using the Workspace Test feature.
-
Code or template execution exceeded maximum invocation time. - This may happen, for example, when an infinite loop is encountered within the code. Please check your code for such issues. If the problem persists, please contact our support.
-
There was an error during the execution of the mock code. - The template or code of the mock is invalid. Please check the Request Log for more details. You may also test mock template/code using the Workspace Test feature.
-
The response generated by the template or code was too large. - See the Limits section to check the maximum response size.
-
Dynamic mocks execution environment not ready. Please check the administration console or contact our support. - Runtime, which executes mocks templates or code, is not ready to serve the request. Please log in to your account and navigate to Workspace Details to re-enable execution runtime. Please try again in 10 minutes or contact our support if the problem persists.
-
An unknown error has occurred. Please try again later or contact our support. - There was an unknown error while processing the request. Please try again in a few minutes or contact our support.
Account Plan and Quota
very account has a plan assigned (by default, it's the Free plan). The owner of the account may sign up for another plan from the Pricing view or the Plan & Billing view. Depending on the chosen plan, the owner may create a particular number of teams and invite a particular number of users to each team. The owner or team members may create workspaces and mocks within the current plan limits. See Frequently Asked Questions on our Pricing for more details.
Limits
There are some limits set on request/response size and duration of the mock execution.
- Maximum request size - 50KB
- Maximum response size (including generated state) - 200KB
- Maximum Template Mock execution time - 10 seconds
- Maximum Dynamic Mock execution time - 2 seconds
- Maximum delay duration - 30 seconds