--- title: "Lusid.Logs.Failure" slug: "lusidlogsfailure" tags: ["LUSID", "provider", "logs", "insights"] updated: 2024-08-21T12:36:38Z published: 2024-08-21T12:36:38Z canonical: "support.lusid.com/lusidlogsfailure" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Lusid.Logs.Failure | **Type** | **Read/write** | **Author** | **Availability** | | --- | --- | --- | --- | | [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | Finbourne | Provided with LUSID | The `Lusid.Logs.Failure` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that retrieves HTTP 4xx client error responses to LUSID. > **Note:** The LUSID user running the query must have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users) to both use the provider *and* read application request logs stored in LUSID. This should automatically be the case if you are the domain owner. **See also:** `Lusid.Logs.Error`, [Lusid.Logs.AppRequest](/v1/docs/lusidlogsapprequest) ## Basic usage ```sql select * from Lusid.Logs.Failure where ; ``` ## Query parameters `Lusid.Logs.Failure` has parameters that enable you to filter or refine a query. To list available parameters, their data types, default values, and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Lusid.Logs.Failure' and FieldType = 'Parameter'; ``` ## Data fields By default, `Lusid.Logs.Failure` returns a table of data populated with particular fields (columns). You can return a subset of these fields. To list fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Lusid.Logs.Failure' and FieldType = 'Column'; ``` > **Note:** Fields marked 'main' are returned by queries that start `select ^ from Lusid.Logs.Failure`. ## Examples > **Note:** For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples). ### Example 1: Retrieve all client error logs between two dates ```sql select * from Lusid.Logs.Failure where StartAt = '2023-03-10T00:00:00Z' and EndAt = '2023-03-10T11:59:59Z' ``` ### Example 2: Retrieve all client error logs for a user starting from a particular date ```sql select * from Lusid.Logs.Failure where User = '00uyi6tvb4yDcFGjM2p8' and StartAt = '2023-03-06T00:00:00Z' ``` ### Example 3: Retrieve all instrument upsert client error logs ```sql select * from Lusid.Logs.Failure where Method = 'UpsertInstruments' ``` ### Example 4: Retrieve all client error logs that start with or contain certain characters ```sql select * from Lusid.Logs.Failure where StartAt = #2022-11-01# and (Method like 'Upsert%' or Method like 'Create%') ``` ### Example 5: Fetch client error logs over a range of dates ```sql @@dt1 = select datetime('now', '-3 days'); @@dt2 = select datetime('now'); select * from Lusid.Logs.Failure where StartAt = @@dt1 and EndAt = @@dt2 and Verb = 'POST' limit 100; ```