Skip to main content

Example approach: Story troubleshooting

Walk through common troubleshooting steps in Tines stories using a simple scenario.

Written by Yanni Hajioannou

Overview

While working in Tines, you may encounter situations that require troubleshooting. This article outlines a scenario that uses common methods to help resolve issues and ensure your stories function correctly.

Tines references

Before getting started, we recommend familiarizing yourself with the functionality this article covers:

In this video, we walk through a story that experiences different errors. We also cover each of these topics at a high level throughout this article.

Make it happen

Page behavior

In Pages, the Page behavior setting defines what happens after your Button is clicked. It can navigate to the next page, redirect to a URL, or display a success message. By default, it's set to Show success message. So if you want it to lead to another page, be sure to update this setting accordingly.

A Page action named "Landing page" on the storyboard with its configuration panel open on the right. The Page behavior dropdown is highlighted with a red border, showing three options: "Redirect to URL," "Move to next page" (currently highlighted in blue), and "Show success message." A red arrow points from the Page to the dropdown, illustrating where to change the behavior setting.

HTTP request error

When making a request to a service, it's important to verify that the request is successful before proceeding with your story. After configuring your actions, always run them to ensure you're receiving the expected data. You can view more details in the Logs tab on the top right corner of the properties panel for a given action.

In the example provided, we get a 404 response status code. The Logs of the action tell us that it cannot POST. This means that we are more than likely using the incorrect method in our API call:

Failed with 404 status code

Response body:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /api/v2/pokemon/120</pre>
</body>
</html>

We change the Method option in our HTTP Request action from POST to GET. This returns a successful response. If you still get an error, it's always good to refer back to the documentation of the API you're reaching out to.

Re-emit last event

Instead of using the Run option on your actions, we recommend navigating to the last successfully executed action, clicking the three-dot menu in the bottom bar, and selecting Re-emit last event. This lets you quickly verify whether an updated or modified action works as expected.

An HTTP Request action named "Get random image" highlighted with a red border on the storyboard, showing an error icon. The properties panel on the right has the Logs tab highlighted with a red arrow. The logs show two entries: "Error: Failed with 404 status code..." and "Info: Sending request to <a href="https://pokeapi.co" rel="nofollow noopener noreferrer" target="_blank">https://pokeapi.co</a>..." both timestamped "Just now."

Incomplete path error

After re-emitting the last event from the top, we see that the final Page action has the following error in the Logs tab:

Incomplete path for value: `get_random_image.body.sprites.front_default.`

This means there was an extra period (.) at the end of the JSON path. We can also see this in the error itself. We'll fix this in the next section.

Edit page

Since this is a Page we're working with, we click the Edit option.

A Page action named "View pic" on the storyboard with an error icon, showing "Couldn't load image" in the preview. The Logs tab is highlighted with a red border in the properties panel on the right. A red arrow points from the Page to the Logs, which show the error message: "Incomplete path for value: get_random_image.body.sprites.front_default." highlighted with a red border.

This opens the Page configuration and lets us access its Elements. In this example, we're using an Image.

We click on where it says Couldn't load image. Here, we can see in the editor Path the incomplete path error from before.

Once that extra period (.) is removed, the results show what would be in that JSON path (since we fixed the previous HTTP Request action).

The Page editor showing the Image element configuration after fixing the incomplete path error. The formula field at the top is highlighted, showing the corrected path get_random_image.body.sprites.front_default (without the trailing period). The Result field is highlighted, showing a successful URL pointing to a Pokémon sprite image on GitHub. Below, the Page preview still shows "Couldn't load image" as it hasn't been re-run yet.

Review the results

After working through these issues, we run the story one last time to make sure it works as intended. Navigate to the first Page action as an end user, click Submit, and see the image results.

The final results Page titled "Results" displaying a pixel art sprite of the Pokémon Chansey (a round, pink creature holding an egg), confirming the story is working correctly after all troubleshooting steps are complete.
Did this answer your question?