Project

General

Profile

Actions

Bug #5438

open

API: Отсуствует валидация входных данных

Bug #5438: API: Отсуствует валидация входных данных

Added by Ксения Нехорошева about 15 hours ago.

Status:
New
Priority:
Normal
Start date:
04/19/2026
Due date:
% Done:

0%

Estimated time:

Description

При вводе данных, отличных от ожидаемых, получаем ответ

<title>500 Internal Server Error</title>

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Expected behavior
Код 400 Bad request

Steps:

  1. В Postman отправить Post запрос, настройки:
    https://sorting-backend-3o5o.onrender.com/sort
    Content-Type выбрать application/json
  2. Тело запроса:
    {
    ""order_rule"": {
    ""З"": ""0"",
    ""С"": ""1"",
    ""К"": ""2""
    },
    ""values"": [
    {
    ""value"": ""Я"",
    ""meta"": ""text-red-500""
    },
    {
    ""value"": ""Д"",
    ""meta"": ""text-blue-500""
    },
    {
    ""value"": ""С"",
    ""meta"": ""text-blue-500""
    }
    ]
    }

No data to display

Actions

Also available in: PDF Atom