Files
flights_web/tests/e2e-angular/fixtures/errors.json
T
gnezim 375bcfb0fa Add e2e test suite from flights-front with Angular API mocks
Copies Playwright e2e tests (58 specs, 300+ tests) designed for cross-app
testing. Adapts API mocks to match real Aeroflot dictionary format (title
objects with multilingual keys), adds board/schedule/days endpoint mocks,
and provides Angular-specific Playwright config on port 4203.
2026-04-15 23:07:44 +03:00

169 lines
4.3 KiB
JSON

{
"errors": {
"notFound": {
"status": 404,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12345"
},
"body": {
"error": "Not Found",
"message": "The requested resource was not found",
"path": "/api/flights/unknown",
"timestamp": "2026-04-06T10:30:00Z"
}
},
"badRequest": {
"status": 400,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12346"
},
"body": {
"error": "Bad Request",
"message": "Invalid request parameters",
"details": {
"field": "date",
"value": "invalid-date",
"message": "Date format should be YYYY-MM-DD"
},
"timestamp": "2026-04-06T10:30:00Z"
}
},
"unauthorized": {
"status": 401,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12347"
},
"body": {
"error": "Unauthorized",
"message": "Authentication required",
"code": "AUTH_REQUIRED",
"timestamp": "2026-04-06T10:30:00Z"
}
},
"forbidden": {
"status": 403,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12348"
},
"body": {
"error": "Forbidden",
"message": "Access denied",
"code": "ACCESS_DENIED",
"timestamp": "2026-04-06T10:30:00Z"
}
},
"serverError": {
"status": 500,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12349"
},
"body": {
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR",
"traceId": "abc123def456",
"timestamp": "2026-04-06T10:30:00Z"
}
},
"timeout": {
"status": 504,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12350"
},
"body": {
"error": "Gateway Timeout",
"message": "The request took too long to process",
"code": "GATEWAY_TIMEOUT",
"timeout": 30000,
"timestamp": "2026-04-06T10:30:00Z"
}
},
"validationError": {
"status": 422,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12351"
},
"body": {
"error": "Validation Error",
"message": "Request validation failed",
"details": [
{
"field": "departureCity",
"message": "Departure city is required"
},
{
"field": "arrivalCity",
"message": "Arrival city is required"
}
],
"timestamp": "2026-04-06T10:30:00Z"
}
},
"rateLimit": {
"status": 429,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12352",
"Retry-After": "60"
},
"body": {
"error": "Too Many Requests",
"message": "Rate limit exceeded",
"code": "RATE_LIMIT_EXCEEDED",
"retryAfter": 60,
"timestamp": "2026-04-06T10:30:00Z"
}
},
"serviceUnavailable": {
"status": 503,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12353"
},
"body": {
"error": "Service Unavailable",
"message": "The service is temporarily unavailable",
"code": "SERVICE_UNAVAILABLE",
"retryAfter": 30,
"timestamp": "2026-04-06T10:30:00Z"
}
},
"flightNotFound": {
"status": 404,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12354"
},
"body": {
"error": "Flight Not Found",
"message": "Flight SU 9999 not found for date 2026-04-06",
"flightNumber": "SU 9999",
"date": "2026-04-06",
"timestamp": "2026-04-06T10:30:00Z"
}
},
"invalidDate": {
"status": 400,
"headers": {
"Content-Type": "application/json",
"X-Request-Id": "err-12355"
},
"body": {
"error": "Invalid Date",
"message": "Date must be within valid range",
"minDate": "2026-01-01",
"maxDate": "2026-12-31",
"providedDate": "2025-01-01",
"timestamp": "2026-04-06T10:30:00Z"
}
}
}
}