DELETE /api/health/errors

Clear Health Errors

Clear all entries from the persistent health error log. Deletes the errors.jsonl file from disk.

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.

Warning

This action is irreversible. All stored errors are permanently deleted. Rotated log files (errors.jsonl.1 through errors.jsonl.5) are not affected.

Request Body

No request body is required.

Response

cleared boolean

true if the error log was successfully cleared, false if an error occurred.

error string

Error message if the clear operation failed. Only present when cleared is false.

Terminal window
curl -X DELETE "http://localhost:8888/api/health/errors"
const response = await fetch("http://localhost:8888/api/health/errors", {
method: "DELETE"
});
const data = await response.json();
console.log(data.cleared); // true
import requests
response = requests.delete("http://localhost:8888/api/health/errors")
data = response.json()
print(data) # {"cleared": True}
{
"cleared": true
}
Request
curl -X DELETE "http://localhost:8888/api/health/errors" \
  -H "Content-Type: application/json"
const response = await fetch("http://localhost:8888/api/health/errors", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json"
},
});

const data = await response.json();
console.log(data);
import requests

response = requests.delete(
    "http://localhost:8888/api/health/errors",
    headers={'Content-Type':'application/json'},
)

print(response.json())
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {
    req, _ := http.NewRequest("DELETE", "http://localhost:8888/api/health/errors", nil)
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
Response
Send a request to see the response