Skip to content
javabypankaj
HomeLibraryPopularCommunity
14
REST API & Web
8 topics · 40 questions
1REST Fundamentals0/222HTTP Methods0/553HTTP Status Codes0/44Error Handling & Problem Details0/115Caching & ETags0/116Pagination, Filtering & HATEOAS0/447API Versioning & Content Negotiation0/118API Design Best Practices0/2222
1REST Fundamentals22HTTP Methods53HTTP Status Codes44Error Handling & Problem Details15Caching & ETags16Pagination, Filtering & HATEOAS47API Versioning & Content Negotiation18API Design Best Practices22
8 topics40 Qs0%
01Core Java17002OOP3203Collections6704Exception Handling2805Concurrency & Multithreading12706Java Streams, Lambda & Functional Programming32807Spring & Spring Boot2608Transactions3209JPA & Hibernate6910Microservices19411Kafka & Messaging9112DevOps, CI/CD & Tooling13313Database & SQL14114REST API & Web4015Design Patterns & LLD5716Advanced Java7117Coding Problems: DSA49218AWS & Cloud4119Data Engineering19420QA, Testing & SDET4121System Design3522Security2023Behavioral / HR: STAR Method37
8Topics
40Questions
0%Complete
3 of 8 topics
Topics
1REST Fundamentals0/222HTTP Methods0/55
3HTTP Status Codes0/44
4Error Handling & Problem Details0/115Caching & ETags0/116Pagination, Filtering & HATEOAS0/447API Versioning & Content Negotiation0/118API Design Best Practices0/2222

HTTP Status Codes

REST API & Web·Topic 3 of 8·4 questions
Q1How do you design REST error responses properly, and why is returning 200 OK with {"success": false} an anti-pattern

Use the right HTTP status code for the failure, return a consistent body with a stable error code, a human message, and a trace id, never leak stack traces, and centralise mapping with @RestControllerAdvice.

Read Answer
Q2Explain the HTTP status code classes (1xx–5xx) and tricky cases

The class digit tells you who is at fault and the exact code tells you precisely why: 400 vs 422, 301 vs 308, 502 vs 503 vs 504, 401 vs 403, and 429 vs 503 each carry a distinct instruction for the client.

Read Answer
Q3What are the common HTTP status codes and their meanings

HTTP status codes are three-digit numbers that summarise the outcome: 2xx means success, 3xx means redirect, 4xx means the client made a mistake, and 5xx means the server failed.

Read Answer
Q4What is HTTP 403, and when is it used vs 401 (403 = authenticated but forbidden; 401 = not authenticated)

401 means not authenticated, so log in; 403 means authenticated but not permitted, so logging in again will not help.

Read Answer
Previous · Topic 2HTTP Methods5 questionsNext · Topic 4Error Handling & Problem Details1 questions
javabypankaj© 2026 javabypankaj
PrivacyTerms
HomeSearchLibrary