tessl install tessl/npm-rest@2.0.0RESTful HTTP client library with composable interceptor architecture for Node.js and browsers
Agent Success
Agent success rate when using this tile
76%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.29x
Baseline
Agent success rate without this tile
59%
{
"context": "This criteria evaluates the engineer's ability to use the rest.js package to implement timeout handling with automatic request cancellation. The focus is on correctly using the timeout interceptor, wrapping clients with interceptors, and handling timeout scenarios.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import rest client",
"description": "Imports the rest client from the 'rest' package (e.g., using require('rest') or require('rest/client/default'))",
"max_score": 10
},
{
"name": "Import timeout interceptor",
"description": "Imports the timeout interceptor from 'rest/interceptor/timeout'",
"max_score": 15
},
{
"name": "Wrap client with timeout",
"description": "Uses the .wrap() method or direct function call to wrap the rest client with the timeout interceptor",
"max_score": 20
},
{
"name": "Configure timeout duration",
"description": "Passes a configuration object with the timeout value (in milliseconds) to the timeout interceptor, typically as { timeout: <value> }",
"max_score": 15
},
{
"name": "Make HTTP requests",
"description": "Uses the wrapped client to make HTTP requests by calling the client as a function with request configuration (path/url)",
"max_score": 15
},
{
"name": "Handle timeout errors",
"description": "Implements proper error handling for timeout scenarios using promise rejection handling (.catch() or try/catch with async/await)",
"max_score": 15
},
{
"name": "Multiple concurrent requests",
"description": "Demonstrates that the solution can handle multiple concurrent requests, each properly managed by the timeout interceptor",
"max_score": 10
}
]
}