Forum Discussion

benlynch's avatar
benlynch
New Member
5 months ago

GET call not working on mock service for free version of Stoplight

Hi,
I have a simple API set up with the free version of Stoplight, after publishing the API and setting up the mock service I get a 422 error on the GET call , all the other calls work fine - is this is known bug or is there a setting I need to change?
I can see that the curl request is not pulling in the request parameters for a GET. 
Thanks

  • Humashankar's avatar
    Humashankar
    Champion Level 3

    Hi benlynch 

    The 422 error in your GET call to Stoplight's free mock service may be attributed to two possible causes.

    Primarily, the free version may have limitations in handling request parameters in mock responses, leading to a missing request parameter configuration.

    This could be due to the absence of expected parameters in your cURL request or inadequate configuration in the mock service.

    To troubleshoot the issue, begin by verifying your mock service setup for the GET endpoint, ensuring that expected request parameters and corresponding responses are defined.

    Also, review your cURL request to ensure it includes required parameters in the URL or headers, as specified by the API design.

    Hope this helps - Happy to help further!!
    Thank you very much and have a great one!
    Warm regards