Opened 4 years ago

Closed 3 years ago

#2452 closed enhancement (fixed)

petascope - return proper HTTP codes to clients

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: petascope Version: 9.8
Keywords: Cc:
Complexity: Medium

Description (last modified by Bang Pham Huu)

503 Service Unavailable (The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded)

→ This should be used when there are no rasservers to process request.

The normal behavior for a client for these particular error codes would be to wait and then re-try the request again, rather than than assuming things just failed and never re-trying again, which in the case of our client would result in a missing tile in the data.

if there is an actual mistake in the script like a syntax error or bad parameters for a function, the server should return a 400 Bad Request error (not a 500).

→ Syntax errors in WCPS requests

Basically, any 500 Internal Server Error returned from the server would be considered by clients an unhandled condition / bug and potential security risk that should be reported and needs to be fixed.

Change History (3)

comment:1 by Bang Pham Huu, 4 years ago

Description: modified (diff)

comment:2 by Bang Pham Huu, 3 years ago

  • Error from clients
- 400 Bad Request
  The server could not understand the request due to invalid syntax.

- 401 Unauthorized
  Although the HTTP standard specifies "unauthorized", semantically this response means 
  "unauthenticated". That is, the client must authenticate itself to get the requested response.

- 403 Forbidden
  The client does not have access rights to the content; that is, it is unauthorized, 
  so the server is refusing to give the requested resource. Unlike 401 Unauthorized, 
  the client's identity is known to the server

- 404 Not Found
  The server can not find the requested resource. In an API, this can also mean that the 
  endpoint is valid but the resource itself does not exist. 
  • Error from server
 - 500 Internal Server Error
   The server has encountered a situation it does not know how to handle.

- 501 Not Implemented (rare)
  The request method is not supported by the server and cannot be handled.

- 503 Service Unavailable
  This is a more precise type of 500 error and shows when there are temporary overloads 
  of the server or sometimes due to maintenance. 
Last edited 3 years ago by Bang Pham Huu (previous) (diff)

comment:3 by Bang Pham Huu, 3 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.