Skip to content

Commit

Permalink
Fix grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
burnash committed May 28, 2024
1 parent 0af16c2 commit d8e0bc0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/website/docs/dlt-ecosystem/verified-sources/rest_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,37 +621,37 @@ In this example, the source will ignore responses with a status code of 404, res

## Troubleshooting

If you encounter any issues while running the pipeline, make sure to enable [logging](../../running-in-production/running.md#set-the-log-level-and-format) to see detailed information about the pipeline execution:
If you encounter issues while running the pipeline, enable [logging](../../running-in-production/running.md#set-the-log-level-and-format) for detailed information about the execution:

```bash
RUNTIME__LOG_LEVEL=INFO python my_script.py
```

This will show you some details about the HTTP requests as well.
This also provides details on the HTTP requests.

### Configuration issues

#### Getting wrong data or no data

If you're getting incorrect data, check the `data_selector` field in the [endpoint configuration](#endpoint-configuration). Make sure the JSONPath is correct and points to the right data in the response. `rest_api` tries to auto-detect the data location, but it may not always work correctly. See the [data selection](#data-selection) section for more details.
If incorrect data is received from an endpoint, check the `data_selector` field in the [endpoint configuration](#endpoint-configuration). Ensure the JSONPath is accurate and points to the correct data in the response body. `rest_api` attempts to auto-detect the data location, which may not always succeed. See the [data selection](#data-selection) section for more details.

#### Not getting enough data or incorrect pagination
#### Getting insufficient data or incorrect pagination

Check the `paginator` field in the configuration. When not explicitly specified, the source tries to auto-detect the pagination method. If auto-detection fails, or the system is unsure, a warning is logged. For production environments, we recommend to specify an explicit paginator in the configuration. See the [pagination](#pagination) section for more details. Some APIs may have non-standard pagination methods, and you may need to implement a [custom paginator](../../general-usage/http/rest-client.md#implementing-a-custom-paginator).

#### Getting HTTP 404 errors

Some API may return 404 errors for resources that do not exist or have no data. You can handle these responses by using the [response actions](#response-actions) configuration with the `ignore` action.
Some API may return 404 errors for resources that do not exist or have no data. Manage these responses by configuring the `ignore` action in [response actions](#response-actions).

### Authentication issues

401 (Unauthorized) errors. This may indicate that:
If experiencing 401 (Unauthorized) errors, this could indicate:

- your authorization credentials are incorrect. Verify your credentials in the `secrets.toml`. Refer to [Secret and configs](../../general-usage/credentials/configuration#understanding-the-exceptions) for more information.
- the authentication type is not correct. Check the API documentation for the correct authentication method. See the [authentication](#authentication) section for more details. For some APIs, you may need to implement a [custom authentication method](../../general-usage/http/rest-client.md#custom-authentication).
- Incorrect authorization credentials. Verify credentials in the `secrets.toml`. Refer to [Secret and configs](../../general-usage/credentials/configuration#understanding-the-exceptions) for more information.
- An incorrect authentication type. Consult the API documentation for the proper method. See the [authentication](#authentication) section for details. For some APIs, a [custom authentication method](../../general-usage/http/rest-client.md#custom-authentication) may be required.

### General guidelines

`rest_api` source uses the [RESTClient](../../general-usage/http/rest-client.md) class to make HTTP requests. You can refer to the RESTClient [troubleshooting guide](../../general-usage/http/rest-client.md#troubleshooting) for guidance on debugging HTTP requests.
The `rest_api` source uses the [RESTClient](../../general-upage/http/rest-client.md) class for HTTP requests. Refer to the RESTClient [troubleshooting guide](../../general-usage/http/rest-client.md#troubleshooting) for debugging tips.

If you're still having issues, feel free to ask for help in our [Slack community](https://dlthub.com/community).
For further assistance, join our [Slack community](https://dlthub.com/community). We're here to help!

0 comments on commit d8e0bc0

Please sign in to comment.