Problem Details
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
return the standard error body.
الموضوعات المخطط لها
- RFC 9457 (which replaces RFC 7807) defines a JSON error format:
type,title,status,detail,instance. - Content type:
application/problem+json. - Spring has
ProblemDetail; you can add extra fields withsetProperty, for example field errors. - Spring can also produce Problem Details for its own errors when enabled; verify the property for your version before recording.
تفاصيل المخطط المبدئي
عرض عملي
{ "type": "about:blank", "title": "Not Found", "status": 404,
"detail": "Product 42 not found", "instance": "/products/42" }اختبر فهمك
What content type does Problem Details use?
أظهر الإجابة
application/problem+json.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.