Interface Error

Generator to generate various error codes and messages.

interface Error {
    databaseError(): string;
    error(): string;
    errorObjectWord(): string;
    gRPCError(): string;
    httpClientError(): string;
    httpError(): string;
    httpServerError(): string;
    runtimeError(): string;
    validationError(): string;
}

Methods

  • A problem or issue encountered while accessing or managing a database.

    Returns string

    a random database error

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.error.databaseError())
    }

    Output (formatted as JSON value)

    {}
    
  • Message displayed by a computer or software when a problem or mistake is encountered.

    Returns string

    a random error

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.error.error())
    }

    Output (formatted as JSON value)

    {}
    
  • Various categories conveying details about encountered errors.

    Returns string

    a random error object word

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.error.errorObjectWord())
    }

    Output (formatted as JSON value)

    {}
    
  • Communication failure in the high-performance, open-source universal RPC framework.

    Returns string

    a random grpc error

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.error.gRPCError())
    }

    Output (formatted as JSON value)

    {}
    
  • Failure or issue occurring within a client software that sends requests to web servers.

    Returns string

    a random http client error

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.error.httpClientError())
    }

    Output (formatted as JSON value)

    {}
    
  • A problem with a web http request.

    Returns string

    a random http error

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.error.httpError())
    }

    Output (formatted as JSON value)

    {}
    
  • Failure or issue occurring within a server software that recieves requests from clients.

    Returns string

    a random http server error

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.error.httpServerError())
    }

    Output (formatted as JSON value)

    {}
    
  • Malfunction occuring during program execution, often causing abrupt termination or unexpected behavior.

    Returns string

    a random runtime error

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.error.runtimeError())
    }

    Output (formatted as JSON value)

    {}
    
  • Occurs when input data fails to meet required criteria or format specifications.

    Returns string

    a random validation error

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.error.validationError())
    }

    Output (formatted as JSON value)

    {}