Legacy Dev Forum Posts

 View Only

Sign Up

API response Status Code is changed from 500 to 400

  • 1.  API response Status Code is changed from 500 to 400

    Posted 06-05-2025 18:21

    Priyanka | 2021-12-15 07:33:28 UTC | #1

    In the API: https://api.mypurecloud.com/api/v2/quality/evaluations/query/ Previously whenever we were trying to read a page which doesn't exists, API was giving a response status code as '500' and message 'internal server error'. But from Effective date : 12/10/2021 , for same scenario we are getting response status code as '400' and message 'Bad request'. Wanted to confirm that is there any API changes that took place due to which we are seeing these status code changes.


    John_Carnell | 2021-12-15 13:46:10 UTC | #2

    Hi Priyanka,

    I am going to forward your inquiry to our product manager. This sounds suspiciously like you were encountering some kind of error in the service that was causing a 500 status code. We generally use 500 error codes to indicate "on snap something really bad happened" and we don't know how to respond. The change to the 400 status code sounds like the dev team probably saw the problem, resolved the thing that was causing the service to panic, and returned a 400 status code to indicate that a bad request was made by the caller. Typically, a 400 indicates you as the caller are sending something into the service incorrectly.

    This is all conjecture, but that is my guess what happens. Let me see if can find some more details for you.

    Thanks, John Carnell Manager, Developer Engagement


    Jose_Ruiz | 2021-12-15 16:49:00 UTC | #3

    Hello Priyanka,

    John's assessment is correct. We have recently modified the evaluations/query API, so instead of showing a generic 500 status code when requesting a page that does not exist, the API now returns a 400 error, which conveys a bad request made by the caller. The full API response in this case is: Status = 400 Code = bad.request Message = Page number X exceeds maximum possible page number X

    Regards Jose Ruiz WEM Product Manager


    Priyanka | 2021-12-16 15:47:43 UTC | #4

    Thanks John and Jose for update!! Are these changes permanent? Do we have any medium through which we can get this information in advance ?


    system | 2022-01-16 15:48:27 UTC | #5

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 12961