---
title: Clear Health Errors
description: "Clear all entries from the persistent health error log. Deletes the errors.jsonl file from disk."
api: DELETE /api/health/errors
baseUrl: http://localhost:8888
layout: '@/layouts/APIEndpointLayout.astro'
auth: none
section: API Reference
ogType: article
keywords: ["clear errors", "delete error log", "health errors"]
tags: ["api", "health"]
---

## Overview

Clears all entries from the persistent error log at `~/.mudabbir/health/errors.jsonl`. This deletes the file from disk — new errors will create a fresh log file.

Use this after resolving known issues to start with a clean slate, or when the error log has accumulated stale entries that are no longer relevant.

<Callout type="warning">
This action is irreversible. All stored errors are permanently deleted. Rotated log files (`errors.jsonl.1` through `errors.jsonl.5`) are not affected.
</Callout>

## Request Body

No request body is required.

## Response

<ResponseField name="cleared" type="boolean">
  `true` if the error log was successfully cleared, `false` if an error occurred.
</ResponseField>

<ResponseField name="error" type="string">
  Error message if the clear operation failed. Only present when `cleared` is `false`.
</ResponseField>

<RequestExample>
<Tabs items={["cURL", "JavaScript", "Python"]}>
  <Tab title="cURL">
    ```bash
    curl -X DELETE "http://localhost:8888/api/health/errors"
    ```
  </Tab>
  <Tab title="JavaScript">
    ```javascript
    const response = await fetch("http://localhost:8888/api/health/errors", {
      method: "DELETE"
    });
    const data = await response.json();
    console.log(data.cleared); // true
    ```
  </Tab>
  <Tab title="Python">
    ```python
    import requests

    response = requests.delete("http://localhost:8888/api/health/errors")
    data = response.json()
    print(data)  # {"cleared": True}
    ```
  </Tab>
</Tabs>
</RequestExample>

<ResponseExample>
<Tabs items={["200"]}>
  <Tab title="200">
    ```json
    {
      "cleared": true
    }
    ```
  </Tab>
</Tabs>
</ResponseExample>
