🚀 Feature Request
When defining a (manual) API request context, one should be able to define failOnStatusCode. This should cause all requests done through this context to apply the flag (unless overridden).
const context = await request.newContext({
baseURL: 'https://example/api/',
extraHTTPHeaders: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.TOKEN}`,
},
failOnStatusCode: true
});
Example
No response
Motivation
It will prevent repetitive code, as we'll no longer have to add the property on every API call as is now:
await this.context.get('contactpersons', { failOnStatusCode: true });
await this.context.get('addresses', { failOnStatusCode: true });
await this.context.get('customers', { failOnStatusCode: true });
🚀 Feature Request
When defining a (manual) API request context, one should be able to define failOnStatusCode. This should cause all requests done through this context to apply the flag (unless overridden).
Example
No response
Motivation
It will prevent repetitive code, as we'll no longer have to add the property on every API call as is now: