Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7549647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:59:54+00:00 2026-05-30T09:59:54+00:00

For example, day, in a somewhat REST-oriented environment, a request comes in for an

  • 0

For example, day, in a somewhat REST-oriented environment, a request comes in for an object that doesn’t exist, like:

GET http://example.com/thing/5

Is there anything wrong with sending back a 404 response who’s body is the same as a a different page? For example, responding like:

404 body: [content from "http://example.com/thing/" which is a list of things]

Does it make any sense to do this? Will this cause any problems with certain browsers? Is it confusing to the user? Or is this perfectly fine to do?

Along these same lines, I would have the content of the 404 response match the request’s accept headers as best I could. (ie. abide by content negotiation with the user agent)

For example, a xml or json request would get something along the lines of a simple error message and something that says “look here for similar things”, while an html request would get an HTML page that has the error message as well as the content of the list page (as I indicated above)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:59:56+00:00Added an answer on May 30, 2026 at 9:59 am

    I think it depends on how the Restful web services are being consumed. If I’m programmatically consuming the web service from a different application, then I would want the status code together and a plain text message instead of a message decorated with HTML tags. I mean, say for example, it doesn’t make sense to return a bloated 404 content if your user makes the web service call using Curl because the message will not be readable to them.

    You could have different “consumes” for each restful webservice. If it’s an XML request, then you return 404 and a plain text message. Otherwise, you return the error page content.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I get the number of a day in a week fro example:
I have a RESTful web service deployed at http://example.com/v1/SomeResource . One day, a new
I have a text that contains usernames prepended with @ symbol. Example: One day
Example input: 8/23/2008 (single digit day/month do not get leading zeros) Desired output: 2008-08-23
If I am developing an app that has a 30 day trial, for example,
Good day! For this example of function html() http://api.jquery.com/html/ How to return to link
For example today is 28/07/2011 How do i get the weeks first day the
I've a var example = 05-10-1983 How I can get the next day of
I'm trying to get the first day of the next quartal, for example now
In HTTP headers can be multi-line. For example: Word-Of-The-Day: The Fox Jumps Over         the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.