Ymtaz Logo

Error Handling

Status Code: 401 Unauthorized

Response:

{
  "status": false,
  "code": 401,
  "message": "خطأ في الهاتف أو كلمة المرور",
  "data": null
}

Status Code: 403 Forbidden

Response:

{
  "error": "Unauthorized"
}

Status Code: 403 Forbidden

Response:

{
  "error": "Forbidden: Invalid account type"
}

Status Code: 422 Unprocessable Entity

This error occurs when there are problems with the submitted form data. It could include validation errors or conflicts with existing data.

Response:

{
  "status": false,
  "code": 422,
  "message": "invalid_data",
  "data": {
    "errors": {
      "email": [
        "البريد الإلكتروني مستخدم من قبل"
      ],
      "phone": [
        "رقم الهاتف موجود سابقاً"
      ]
    }
  }
}