Is there any Doctype available to store API request and response status?

Hi all,

Is there any existing Doctype in Frappe or ERPNext that is used to log API requests and their responses, including status (e.g., success, failure, error message, etc.)?

If not, what is the best practice to implement this kind of logging within the framework?

Thanks in advance!

Errors:

Built in API calls mostly log error to the Error Log doctype.

For custom apps you can use frappe.log_error() to make it show up in the Error Log doctype

Calls:
As far as I know, no (not sure). However, you can simply create a new doctype ‘API LOG’ and insert a record for every api call (add it to every whitelisted method in your custom app)

1 Like

okay thanks