QA Interview Hub · Knowledge base · Quizzes · Українська

API

Anatomy of a request and response

What a request and a response consist of

An HTTP request consists of a method, a URL, headers and a body, and a response of a status code, headers and a body. Each part is a separate source of test cases, so headers (Location, Content-Type) and body field types are checked as well as the status. The path identifies a resource, the query refines the listing, and secrets go in Authorization, because URLs end up in logs.

API · Request anatomy

A test checks only for status 201. What else in this response can be broken?

A developer says: "The endpoint works, it returns 201." The test is green, yet the mobile client cannot open the transfer it just created: the response has no Location, and the amount came back as the string "150". The status was right, the other parts of the message were broken. To check everything you need to know what a request and a response consist of, and to see each part as a separate source of test cases.

Below: the parts of an HTTP exchange, why it is built this way, and how to base tests on it.

How it is built

Per RFC 9110, an HTTP message always has three layers: a start line, headers ("name: value" pairs) and an optional body. In a request the start line holds the method and the target (a path with a query), in a response it holds the status code. Here is a complete request that creates a transfer:

POST /v1/accounts/42/transfers?dryRun=false HTTP/1.1
Host: api.bank.test
Authorization: Bearer eyJhbGciOi...
Content-Type: application/json
Idempotency-Key: 7f3c9a10-5d2e-4b8a-9c11-0e6f2a7b1d34

{ "toAccount": "UA21...", "amount": 150.00, "currency": "UAH" }

The request has four parts: the method (POST, what to do), the URL (base URL with a version, the path to the resource, the query), the headers (metadata: who you are, the body format) and the body (data). The response has three parts:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Location: /v1/transfers/tr_91
X-Request-Id: 5b0e7c2a

{ "id": "tr_91", "status": "pending", "amount": 150.00 }

Parts of a request and a response

RequestResponse 1 method 2 URL 3 headers 4 body 5 status code 6 headers 7 body
Figure 1. Seven parts, each of which can be right or broken independently of the others. The status code is highlighted because it is checked most often, and that is why the rest gets forgotten.

Why it is designed this way. Splitting a message into a start line, headers and a body lets intermediaries (proxies, gateways, caches) work with the metadata alone, without parsing the body. Content-Type says how to read the body, Content-Length or Transfer-Encoding says where it ends. So a mistake in a header breaks body parsing even when the body itself is correct.

Path or query. The path points to a specific resource (/users/42), the query refines the result (/users?status=active&page=2). If the resource loses its meaning without the parameter, it is a path. If it is a selection option (filter, sort, page), it is a query.

Example: from "status only" to checking the parts

Before: expect(res.status()).toBe(201) and nothing else. A test like that does not catch the missing Location or the string amount. After: we check every part of the response that belongs to the contract.

import { test, expect } from '@playwright/test';

test('transfer: response parts are complete', async ({ request }) => {
  const res = await request.post('/v1/accounts/42/transfers', {
    headers: { 'Idempotency-Key': crypto.randomUUID() },
    data: { toAccount: 'UA21...', amount: 150, currency: 'UAH' },
  });
  expect(res.status()).toBe(201);
  expect(res.headers()['content-type']).toContain('application/json');
  expect(res.headers()['location']).toMatch(/\/transfers\/tr_\w+$/);
  const body = await res.json();
  expect(body.status).toBe('pending');
  expect(body.amount).toBe(150); // a string "150" would fail here
});

The first expect catches a wrong status, the second and third check headers (the client needs Location to reach the new resource), the last two check the body: the value and the type in one expression, because toBe(150) does not let the string "150" through. The request is built from parts as well: Idempotency-Key is a header, the data is the body, while the base URL and the token live in the configuration, not in the test.

Limits and alternatives

  • Not everything in a request is mandatory. GET and DELETE usually have no body, and a server may reject or ignore a body that has no meaning (RFC 9110 does not forbid it, but gives it no defined semantics).
  • Header names are case-insensitive: Content-Type and content-type mean the same. Clients (Playwright, fetch) return names in lower case, so a test reads headers()['content-type'].
  • Not all of it is "pure" HTTP: the protocol version (HTTP/1.1, HTTP/2) changes the transport but not the semantics of the parts. An API-level test usually does not see it.
  • In Postman or Insomnia the same parts are the Params, Headers and Body tabs. The principle is the same.

Common mistakes

  • Checking only the status. Broken headers, field types or extra data go unnoticed, and the client fails in production.
  • Hiding an id in the query instead of the path (/transfers?id=91), or a filter in the path. It makes caching and reading logs harder, so it is a remark about the API design worth raising.
  • Putting a token in the URL. The query ends up in proxy logs and browser history, so secrets go in the Authorization header.
  • Forgetting Content-Type in the request. The server does not know how to read the body and answers 415 or, worse, silently reads it wrongly.

Check yourself

The response is 201 and the body is right, but the mobile client cannot see the created resource. Which parts of the response should you check first?

Answer

The headers: first of all Location (the URL of the new resource) and Content-Type. The status and the body can be perfect while the client relies on a header that is missing.

A filter by payment status: /payments/pending or /payments?status=pending?

Answer

The query. pending does not identify a resource, it narrows a collection, and /payments makes sense without it. The path is kept for resource identifiers.

In an interview. Junior: A request consists of a method, a URL, headers and a body, a response of a status code, headers and a body. A path parameter identifies a resource, a query filters or paginates the result. Middle/Senior: Each part is a separate source of cases: in a create test I check not only 201 but also Location, Content-Type and the types of the body fields. Headers decide how the body is read, so a header mistake breaks the client even with a correct body. Secrets go in a header, not in the URL, because the URL lands in logs.

What to check in each part

For each part of the request and response (URL, path, query, headers, body, status, time) separate positive and negative cases are written. The order of cases mirrors how the server parses a request: cheap checks (token, format) first, the owner and business rules last. The status is checked exactly, not as "any 4xx", plus the error format and the absence of sensitive fields.

API · Request anatomy

A new endpoint: where do the cases start? Walking through the request parts gives a ready plan.

A ticket arrives: "Test POST /accounts/{id}/transfers". An empty page of cases is scary, and the usual result is "I'll send a valid request, then some invalid one". A better way: take the request from the previous lesson and, for each of its parts and then for each part of the response, ask "what can go wrong here". The table below is exactly such a plan.

PartExampleWhat to check
Base URLhttps://api.bank.test/v1Keep it in a variable {{baseUrl}}, the version is in the address
Path/accounts/42/transfersSomeone else's or a non-existent id gives 403 or 404
Path param42An invalid type (abc) gives 400
Query param?dryRun=falseFilters, pagination, sorting, unknown values
HeadersAuthorization, Content-Type, AcceptNo token gives 401; a wrong Content-Type gives 415
BodyJSON with fieldsRequired fields, types, limits
Status201 CreatedThe code matches the documentation
Response headersContent-Type, LocationContent type, cache, CORS
Response body{ "id": "tr_91", "status": "pending" }Structure, types, values, no extra sensitive fields
Time180 msWithin the SLA

Why these cases: the order of checks on the server

The codes 401, 415, 400 and 422 are not random: they reflect the order in which a server (or the gateway in front of it) processes a request. Cheap checks come first so the database is not used for a request that will be rejected anyway.

A typical order of request processing

1 authentication → 401 2 permission (role, scope) → 403 3 Content-Type → 415 4 JSON parsing → 400 5 field validation → 422 6 owner, business rule → 404/409 7 execution → 2xx
Figure 1. A typical order: the cheaper the check, the earlier it stands. A real service may swap items, so the order of cases is verified against the documentation.

Why this order. Without a token there is no point in reading the body: 401 answers at once. The format (Content-Type, JSON syntax) is checked before the semantic validation, otherwise the server cannot read the fields. Rights to the action (role, scope) are visible in the token, so they are checked early. The resource owner and business rules (409, for instance insufficient funds) are checked last, because they need database state. For someone else's resource 404 is more common than 403, so as not to reveal that such an id exists: this is an approach, not a rule, and it is verified against the contract. The difference between 400 and 422 and other pairs is covered in the lesson "401 vs 403, 400 vs 422, 500 vs 503".

Example: a set of negative cases and the bug it finds

Three quick curl requests, one per part of the request (the shell has BASE and TOKEN set):

# 1. no token
curl -i -X POST "$BASE/v1/accounts/42/transfers" \
  -H "Content-Type: application/json" -d '{"amount": 150}'

# 2. wrong Content-Type
curl -i -X POST "$BASE/v1/accounts/42/transfers" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: text/plain" -d 'amount=150'

# 3. path param of the wrong type
curl -i "$BASE/v1/accounts/abc/transfers" -H "Authorization: Bearer $TOKEN"

Expected: the first gives 401, the second 415, the third 400. Suppose the second returns this:

HTTP/1.1 500 Internal Server Error
Content-Type: text/html

<html><body>NullPointerException at TransferController...</body></html>

That is a bug in two places: status 500 instead of 415 (the server is not prepared for a foreign type), and an HTML body mentioning an exception instead of a JSON error (which is also a leak of internal details). One negative case on the "Headers" part found both. Once the cases are stable they move into a parameterised test, where the table of expectations is separate from the code:

const cases = [
  { name: 'no token', headers: {}, path: '/v1/accounts/42', status: 401 },
  { name: 'id is not a number', headers: AUTH, path: '/v1/accounts/abc', status: 400 },
  { name: 'unknown id', headers: AUTH, path: '/v1/accounts/999999', status: 404 },
];

for (const c of cases) {
  test('GET account: ' + c.name, async ({ request }) => {
    const res = await request.get(c.path, { headers: c.headers });
    expect(res.status()).toBe(c.status);
    expect(res.headers()['content-type']).toContain('json');
  });
}

Every case checks content-type, because an error must also follow the API format. Adding a case means adding a row to the table.

"Status only" versus checking the parts

Typical

Status only

A green test notices neither HTML instead of JSON, nor a missing Location, nor a secret in the body. The client breaks later.

Better

Status, headers, body, time

Each part has its own check. The defect shows up in the test, not in production logs.

Figure 2. The same request can be checked shallowly or fully. The full check costs a few lines.

Limits and alternatives

  • The table describes standard, not guaranteed, behaviour: the API documentation and the contract take priority. If a service returns 404 instead of 403 by design, it is not a bug.
  • Response time in a single run is a weak signal (network, cold cache). It is checked as a rough threshold, while percentiles and load belong to a separate test.
  • Schema validation (OpenAPI, JSON Schema) covers the body structure and types automatically, but does not replace cases on values, permissions and state.
  • UI checks know nothing about headers: some cases from the table can only be done at the API level.

Common mistakes

  • Checking only the positive path. Most defects live in rejected requests: a wrong type, someone else's id, a missing header.
  • Not checking the error format. A valid status with an HTML body breaks a client that expects JSON.
  • Catching "any 4xx". A test status >= 400 lets a swap of 415 for 500 or 404 for 403 through, so the status is checked exactly.
  • Duplicating the base URL and the token in every test. Changing the environment breaks everything at once, so they go into variables or config.

Check yourself

A request with Content-Type: text/plain and valid JSON inside returns 200 and creates the resource. Is this a bug or acceptable flexibility?

Answer

Most likely a bug if the contract requires application/json: the server should answer 415. Silently "accepting everything" hides client mistakes and opens the way for attacks with unexpected types. The documentation has the last word: if it says otherwise, it is acceptable.

Why does the token check come before field validation in the processing order?

Answer

There is no point for an unknown client to have the body read or the database queried. Besides, validation errors reveal the shape of the data and should not be shown without authentication. So 401 first, and only then the content.

In an interview. Junior: I go through the request part by part: URL and path parameters, query, headers, body, and in the response the status, headers, body and time. Each part has its own negative cases, for example an invalid id type gives 400 and a wrong Content-Type gives 415. Middle/Senior: The cases reflect the order in which the server processes a request: authentication, rights, format, syntax, validation, owner and business rules. I check the status exactly, not "any 4xx", and add a check of the error format and the absence of sensitive fields. I keep the cases in a table so a new one costs one row.

Request and response body: types, null and empty values

JSON has three ways to say no value: an absent field, null and an empty string, and the contract defines what each means. In JSON Merge Patch an absent field is unchanged while null clears the value, so state is checked with a second request. Money goes as integers in minimal units or a decimal string, never a float, large ids are compared as strings, and bad input gives 4xx, never 500.

API · Request anatomy

A PATCH with null changed nothing. A server bug, or is it by design?

A user wants to remove the middle name from a profile. The frontend sends {"middleName": null}, the server answers 200 and... the field stays. The developer explains that "null and an absent field are the same for us". Who is right depends on the contract, but the confusion itself is typical: JSON has several ways to say "there is no value", and each means something different. Most defects in a request and response body sit exactly at the junction of types and empty values.

Types and three kinds of "empty"

JSON (RFC 8259) has six types: string, number, true/false, null, array, object. For one optional field there are three different requests:

{ "middleName": null }   // set to "no value"
{ }                      // field is not in the body
{ "middleName": "" }     // an empty string

The contract has to say what each one means. In a PATCH following JSON Merge Patch (RFC 7396), a field missing from the body is left unchanged, and null removes the value. An empty string is already a value, and it may be invalid (minimum length) or valid. In a POST a missing optional field usually means "use the default", and null is either rejected or treated as "not set".

An absent field versus null in PATCH

The field is not in the body

{ "nickname": "olena" }: middleName is not touched and stays as it was.

The field is null

{ "middleName": null }: the value is cleared, and GET returns null or omits the field afterwards.

Figure 1. Two behaviours that are both legitimate if the contract describes them. The bug is when they get mixed up or differ between endpoints.

Why it is like this. The protocol has no separate word for "leave as is", so partial updates needed an agreement: an absent field means "do not touch", null means "remove". That is why PATCH distinguishes these states, while in PUT (full replacement) an absent field usually means "value reset" or an error.

Example: catching a silently swallowed null

The server answers 200 to a PATCH, and then GET shows the old value:

PATCH /v1/users/7 HTTP/1.1
Content-Type: application/merge-patch+json

{ "middleName": null }

HTTP/1.1 200 OK
Content-Type: application/json

{ "id": 7, "firstName": "Olena", "middleName": "Ivanivna" }

The status is right, the body looks right, but middleName was not cleared. It shows only on a second request after the change, so the test checks the state, not just the response to PATCH:

const MERGE_PATCH = { 'Content-Type': 'application/merge-patch+json' };

test('PATCH null clears the field, absence keeps it', async ({ request }) => {
  await request.patch('/v1/users/7', { headers: MERGE_PATCH, data: { middleName: null } });
  let user = await (await request.get('/v1/users/7')).json();
  expect(user.middleName ?? null).toBeNull();

  await request.patch('/v1/users/7', { headers: MERGE_PATCH, data: { nickname: 'olena' } });
  user = await (await request.get('/v1/users/7')).json();
  expect(user.nickname).toBe('olena');
  expect(user.middleName ?? null).toBeNull(); // not touched by the second PATCH
});

The test checks both sides: null clears the field, and a request without the field leaves it alone. The cause of such a defect is often a deserializer that turns null and absence into the same "not provided".

Types, numbers, money, dates

  • Type. "amount": "150" instead of 150: the server either rejects it (400/422) or silently coerces it. Both behaviours are possible; it is a bug when they differ between endpoints or the server fails with 500.
  • Money. Floating-point fractions are unsuitable: 0.1 + 0.2 does not equal 0.3. The amount is returned as an integer in minor units (cents) or as a decimal string. Check rounding, zero, minimum, maximum, negatives.
  • Large integers. JavaScript safely holds integers up to 2^53 − 1 (Number.MAX_SAFE_INTEGER), so large ids are often returned as strings. The test should compare them as strings.
  • Dates. The standard format is ISO 8601 / RFC 3339 with a time zone, 2026-11-09T10:15:00Z. Check the format in the response, invalid dates (2026-02-30), time zones and day boundaries.
  • Strings. Minimum, maximum and one over, spaces at the edges, Unicode (Cyrillic, emoji), characters for injections.
  • Arrays. Empty, one element, many, duplicates, null inside.

A typical table of values is handy to keep in a parameterised test:

const amounts = [
  { value: 0.01, ok: true },     // minimum
  { value: 0, ok: false },       // zero
  { value: -5, ok: false },      // negative
  { value: '150', ok: false },   // a string instead of a number
  { value: null, ok: false },    // null
  { value: 1e21, ok: false },    // above the allowed maximum
];

for (const a of amounts) {
  test('amount ' + JSON.stringify(a.value), async ({ request }) => {
    const res = await request.post('/v1/accounts/42/transfers', {
      data: { toAccount: 'UA21...', amount: a.value, currency: 'UAH' },
    });
    expect(res.status()).toBe(a.ok ? 201 : 422);
  });
}

The expectations here are illustrative: the contract says 422 means rejection and 201 success. In a real project the code comes from the documentation.

Limits and alternatives

  • An unknown field is either ignored or rejected with 400. Which one is up to the contract; what matters is that it is the same everywhere. If it is ignored, the value must not be saved (otherwise it is mass assignment).
  • An empty body where one is required, and broken JSON, give 400; a body that is too large gives 413. None of these cases should end in 500.
  • Schema validation (JSON Schema, OpenAPI) catches types, required fields and formats automatically, but rules like "the amount is not above the balance" are checked separately.
  • Not every API distinguishes an absent field from null. If it does not, that must be written in the documentation, and the test checks exactly that behaviour.

Common mistakes

  • Not distinguishing the three "empty" states in test cases. One case "empty field" hides three different behaviours.
  • Checking only the response to PATCH, not the state after it. The server can return 200 and change nothing.
  • Comparing large ids as numbers in JS. The test passes because the loss of precision distorted both sides equally.
  • Accepting 200 for a wrong type. Silently coercing "abc" to 0 stores garbage in the database.

Check yourself

A PATCH with {"middleName": null} returns 200, and GET still returns the old value. What do you check and what is probably broken?

Answer

Check the state with a second GET, as in the test above. Most likely the deserializer does not distinguish null from an absent field and treats both as "not provided". If the contract says null clears, it is a bug; if not, the documentation needs clarifying.

Why is "amount": 0.1 + 0.2 dangerous in a money API, and what should be done?

Answer

Floating-point numbers do not store decimal values exactly: the result is 0.30000000000000004. The amount is returned as an integer in minor units or a decimal string, and the test compares the value without loss.

In an interview. Junior: In the amount field I check the type, the limits (zero, minimum, maximum, negatives), null, the format and precision, plus extra and missing fields. Middle/Senior: I distinguish three states: an absent field, null and an empty string, because in PATCH they mean different things ("do not touch" and "clear"). I check the state after a change, not just the response. Money is kept in minor units, large ids are compared as strings, and invalid input must give 4xx, never 500.

Error format and service response headers

The API error format is part of the contract. The standard is Problem Details (RFC 9457, application/problem+json), but a custom shape works if it is uniform for all codes. The client relies on a stable machine code, not the text, and the shape never exposes a stack trace or SQL. To find a request in logs, the response and bug report carry a request id such as X-Request-Id or traceparent.

API · Request anatomy

The client got a 500 and the bug report says only "does not work". How do you find that request in the logs?

The frontend shows "Something went wrong". The bug report has a screenshot and a time. The developer asks: "Which request?". The service logs hold thousands of similar lines for that minute. Without a request identifier the search takes an hour, with it a few seconds. That is why the error format and the service response headers are as much a part of the contract as a successful body: a client parses them in code, and a person reads them during an investigation.

How an error is built

An error should be as structured a response as a success, otherwise the client cannot handle it. The standard option is Problem Details, RFC 9457 (the successor of RFC 7807), with the media type application/problem+json:

HTTP/1.1 422 Unprocessable Content
Content-Type: application/problem+json
X-Request-Id: 5b0e7c2a

{
  "type": "https://api.shop.test/errors/validation",
  "title": "Validation failed",
  "status": 422,
  "detail": "amount must be greater than 0",
  "instance": "/v1/accounts/42/transfers",
  "errors": [{ "field": "amount", "message": "must be greater than 0" }]
}

The fields type (a URI identifying the kind of error), title (a short name), status, detail (an explanation for this occurrence) and instance are standard, the rest are extensions (here errors with a list of fields). A custom shape (code, message, details) is fine too, as long as it is the same everywhere.

Why it is like this. A client that gets an error has to do one of three things: show the user a message, highlight a field or retry. That needs a stable machine key (type/code), a description for a person and a pointer to the field. The message text gets changed and localised, so the client must not depend on it. That is why the error code is stable and the text is not.

One id through all the layers

Client: a request without an id Gateway: X-Request-Id: 5b0e7c2a Service: the id in every log line Response: the id in a header, even for 500
Figure 1. The id is created at the entry point (or accepted from the client), passes through all services and returns to the client. Then the bug report contains the id, and a developer finds everything in the logs in seconds.

For such an id, X-Request-Id (an informal but widespread convention) or the standard traceparent header from W3C Trace Context, supported by tracing systems, is used. Date (the server clock) and Content-Length (matching the actual body) are useful too.

Example: HTML instead of JSON and a leak in the error

When the backend fails, a gateway may return its own error page instead of an API response:

HTTP/1.1 502 Bad Gateway
Content-Type: text/html

<html><head><title>502 Bad Gateway</title></head>...

An error the client cannot parse and an error that follows the contract

Typical

HTML or a stack in the body

text/html, an exception name, SQL, a file path. The client cannot parse the response, and an attacker learns the internals.

Better

Problem Details + request id

application/problem+json, stable fields, the validation field, an id for the logs and no internal details.

Figure 2. This is the difference between an error you can work with and an error that merely reports a problem.

To avoid checking this by hand in every test, we move the error check into one function:

async function expectProblem(res: APIResponse, status: number) {
  expect(res.status()).toBe(status);
  expect(res.headers()['content-type']).toContain('application/problem+json');
  const body = await res.json();
  expect(body.status).toBe(status);
  expect(typeof body.title).toBe('string');
  expect(JSON.stringify(body)).not.toMatch(/\bat \w+\.|SELECT |Exception/);
  expect(res.headers()['x-request-id']).toBeTruthy();
  return body;
}

test('validation error has a stable shape', async ({ request }) => {
  const res = await request.post('/v1/accounts/42/transfers', {
    data: { toAccount: 'UA21...', amount: -1, currency: 'UAH' },
  });
  const body = await expectProblem(res, 422);
  expect(body.errors[0].field).toBe('amount');
});

The function checks the status, the media type, that status in the body matches the HTTP status, that title exists, that there are no traces of a stack or SQL, and the request id header. The regex for "traces" is rough (it looks for common words), so extend it for the project's stack.

What to check

  • The same structure for 400, 401, 403, 404, 409, 422 and even 500. A common defect: an HTML page from a gateway or framework instead of JSON.
  • Content-Type matches the body, and status in the body matches the HTTP status.
  • Validation errors name the field (field), not just "bad request".
  • The body does not reveal internals: call stack, SQL, file paths, library versions.
  • The login message is the same for "no such user" and "wrong password", so as not to reveal whether an email exists.
  • The error code is stable for the client, while the text can be changed or localised.

Limits and alternatives

  • Problem Details is not the only format: a project may have its own shape, and GraphQL often returns errors in an errors field with status 200 (the GraphQL over HTTP specification recommends 4xx for errors in the request itself). The requirement stays the same: the shape is uniform and documented.
  • If a gateway or a load balancer fails, the response may not come from the API, so the format of gateway errors (502, 503, 504) is agreed separately.
  • A request id does not guarantee finding the request if the logs are not indexed by it. That is an observability question, to be discussed with developers.
  • For client errors (4xx) a detailed message helps, while for 5xx the details are better left in the logs and the client gets only the id.

Common mistakes

  • Checking only the error status. A body with HTML or a stack goes unnoticed.
  • Attaching only a screenshot to a bug report. Without a request id and the time it is hard for a developer to find the request.
  • Distinguishing "no such user" and "wrong password" in the message. That allows email enumeration.
  • Tying the client to the error text. After a rewording or a translation everything breaks, so the client relies on the code.

Check yourself

On a 500 the service returns a gateway HTML page, and the status is right. Is it a defect?

Answer

Yes, if the contract promises JSON for all errors: a client that calls res.json() will fail on parsing. The test should check Content-Type and the body structure even for 5xx, not only the status.

What should you add to a bug report about an API error so a developer finds the request in the logs within a minute?

Answer

The method and URL, headers without secrets, the request body, the response status and body, X-Request-Id (or traceparent) and the exact time with a time zone. The request id matters most: it finds the request in the logs directly.

In an interview. Junior: To a bug report about an API error I attach the method and URL, headers without secrets, the request body, the status, the response body, the request id and the time. An error must have a uniform structure, not HTML and not a stack. Middle/Senior: The error format is part of the contract: Problem Details (RFC 9457) or a custom shape, but uniform for all codes, with a stable machine code and no internal details. I check Content-Type, that status in the body matches the status, the validation field, the same login response for both cases and a request id even in 5xx.