Error Handling: support errors and data in a response (#20169)
This commit is contained in:
@@ -283,6 +283,26 @@ func init() {
|
||||
},
|
||||
})
|
||||
|
||||
registerScenario(&Scenario{
|
||||
Id: "random_walk_with_error",
|
||||
Name: "Random Walk (with error)",
|
||||
|
||||
Handler: func(query *tsdb.Query, context *tsdb.TsdbQuery) *tsdb.QueryResult {
|
||||
queryRes := getRandomWalk(query, context)
|
||||
queryRes.ErrorString = "This is an error. It can include URLs http://grafana.com/"
|
||||
return queryRes
|
||||
},
|
||||
})
|
||||
|
||||
registerScenario(&Scenario{
|
||||
Id: "server_error_500",
|
||||
Name: "Server Error (500)",
|
||||
|
||||
Handler: func(query *tsdb.Query, context *tsdb.TsdbQuery) *tsdb.QueryResult {
|
||||
panic("Test Data Panic!")
|
||||
},
|
||||
})
|
||||
|
||||
registerScenario(&Scenario{
|
||||
Id: "logs",
|
||||
Name: "Logs",
|
||||
|
||||
Reference in New Issue
Block a user