Ensure that an appropriate error is returned when an incorrect API endpoint is provided.

Status : passed

Start Time : 15-12-2024 08:45:11

End Time : 15-12-2024 08:45:13

Duration : 1.50 seconds

Title : Ensure that an appropriate error is returned when an incorrect API endpoint is provided.

Created By : arun-ramanan@netspective.in

Created At : 2024-12-15

Priority : High

Description

This test verifies that the API responds with an error message and the appropriate HTTP status code when a request is made to an invalid or incorrect endpoint.

Pre-Conditions:

  1. API server is running and accessible.

Test Steps:

  1. Step 1: Send a GET request to an incorrect endpoint (e.g., /logins).
  2. Step 2: Observe the response status code and verify it matches the expected error code (e.g., 404 Not Found) and Confirm that the error message does not reveal sensitive server or API information.

Expected Result:

  • The server responds with an HTTP status code of 404 Not Found.
  • The response body includes an error message such as {"error": "Endpoint not found"}.
  • No sensitive server or API details are exposed in the error response.

Actual Result

Observe the response status code and verify it matches the expected error code (e.g., `404 Not Found`) and Confirm that the error message does not reveal sensitive server or API information. passed 15-12-2024 08:45:13 15-12-2024 08:45:13
Send a GET request to an incorrect endpoint (e.g., `/logins`). passed 15-12-2024 08:45:11 15-12-2024 08:45:13