Find message errors

Tricentis Tosca API Scan differentiates between two types of errors:

Payload errors

A payload error is information that the API does not expect for a particular request. Tricentis Tosca API Scan can send the message, but the API will be unable to fulfill the required task.

In this case, the status bar of the response message contains the following information:

  • Status Code indicating the error

  • Response Time and Content-Type

Example 1: Missing parameter information

The request message below contains the variable {petID} in the Resource. To enable the API to fulfill the request, you need to add this information to the petId parameter in the Params tab.

getPetById request

If you do not add the information, the API returns an error message in the response.

getPetById error message

Example 2: Faulty parameter information

In this example, you want to create a new user and then delete it again. The initial request message created the user Ella Example:

createUser request

To further test the API, you can delete the user again. However, the first name is misspelled.

Faulty payload in the deleteUser request

As a result, the API returns an error message.

deleteUser error message

Transport information errors

Transport information consists of the following elements:

  • Method: HTTP method used for the request

  • Endpoint: API base URL

  • Resource: Resource identifier for this endpoint

Faulty transport information prevents the system from sending a message. In this case, the system indicates the error in a dialog or in the status bar of the response message.

Example 1: Wrong Method

This example shows the API Scan error behavior if you choose a wrong Method.

The request addPet prompts the API to add a pet to the store. The API defines POST as the correct HTTP Method for this request, but you can still select a different Method.

Change Method to Get

Since you have chosen the wrong Method, the API Scan cannot send the message.

Error message

Example 2: Erroneous endpoint

In this example, you try to send a Remote Function Call (RFC) to SAP. However, the Endpoint contains a wrong character.

RFC call with faulty Endpoint

The API Scan displays a RFC status code in the Status Code bar that indicates the error.

In this case, SAP refused the connection.

RFC error message