What is a 291 status code?


I’m new to using K6 and have written a very basic test script.
When running the script I sometimes see that the transaction is split into 2 with the majority of the calls returning a 200 status code and the others returning a “291” status code. By splitting it like this the results also get a little skewed as it calculates the 95th percentile separately etc.

I have no idea what a 291 status is, and I can’t find anything when searching online.
Any help/ideas would be appreciated.

Hi @w4dd325 !

Welcome to the community forums! :wave:

As far as I can tell, this status code came from the endpoint you were testing.

I’d recommend implementing the check and logging the response to get insights into what server responded with this HTTP status.

import http from 'k6/http';
import { check, fail } from 'k6';

export default function () {
  const res = http.get('http://httpbin.test.k6.io');
  const checkOutput = check(
      'response code was 200': (res) => res.status == 200

  if (!checkOutput) {

Let me know if that answers,

1 Like

Worked a charm, thanks.
The 291 is a custom code for one of the services that gets called.
Thanks for the help!

1 Like