HTTP Response Codes

Following are HTTP response codes that may be received from Swarm, with notes about any Swarm-specific meaning.

See RFC 7231 section 6 of the HTTP/1.1 specifications for information about response status codes.

Response

Methods

Notes

Response

Methods

Notes

100

Continue

POST, PUT, APPEND

See https://perifery.atlassian.net/wiki/spaces/public/pages/2443821645, WRITE for Large Files (Expect: 100-continue).

See https://perifery.atlassian.net/wiki/spaces/public/pages/2443821350, Issues with 100-Continue Header

101

Switching Protocols

-

Informs the client about the server switching the protocols to the one specified in the Upgrade message header field during the current connection.

200

OK

GET, HEAD, DELETE

Standard response for successful requests.

For EC, indicates Swarm found enough segments to recreate the object, which is a prerequisite for success.

201

Created

POST, PUT, COPY, APPEND

The success response for a POST or PUT request.

202

Accepted

POST

Request accepted (such as for a multipart completion), but not processed.

203

Non-Authoritative Information

-

Returned meta information was not the definitive set from the origin server.

204

No Content

-

Request succeeded without requiring the return of an entity-body.

205

Reset Content

-

Request succeeded but requires resetting of the document view that caused the request.

206

Partial Content

GET

Successful response to a GET that includes one or more Range headers, returning the specific range data.

207
Multi-Status

-



300

Multiple Choices

-

Requested resource has multiple choices at different locations.

301

Moved Permanently

All

Resource permanently moved to a different URL

Requests the client to resend the current request to the location supplied in the response headers and to direct all future requests to that new node until further notice. The location header supplies the authorization parameter to be included in the request to the new PAN.

302

Found

-

Requested resource was found under a different URL but the client should continue to use the original URL.

303

See Other

-

Requested response is at a different URL and can be accessed only through a GET command.

304
Not Modified

GET, HEAD, PUT, APPEND, COPY

If-Modified-Since condition not met. Requested object was not modified since the last request.

Requested object was not modified since the time specified in the If-Modified-Since header. The response is returned without any message-body.

If-None-Match condition not met on GET or HEAD.

305

Use Proxy

-

Requested resource should be accessed through the proxy specified in the location field.

307

Temporary Redirect

All

Resource is temporarily moved to a different URL.

The client should resend the current request to the location supplied in the response headers, but to continue using the original PAN for the next request until further notice.

See https://perifery.atlassian.net/wiki/spaces/public/pages/2443820846, use Workarounds for Redirects.

400

Bad Request

All



401

Unauthorized

All

Occurs as the normal initial response of HTTP authentication for a domain.

Administrative request lacks an Authorization header with suitable administrative credentials. The response includes a WWW-Authenticate challenge containing the administrative domain named Castor administrator and other required items.

403

Forbidden

Varies

Unsupported method was used.

Alias objects only support POST, DELETE, GET, and HEAD.

Domain objects only support GET, HEAD, COPY, PUT, and APPEND.

404

Not Found

GET, HEAD, APPEND, PUT, COPY, DELETE

Indicates that the content cannot be located in this cluster. Common causes include these:

Object deletion

Request errors (such as the wrong bucket name)

Network failure

Node(s) down for maintenance

Timeouts due to a heavily loaded or extremely active cluster

Rebalancing due to new drive capacity in the cluster

Requesting aliased objects without using the etag flag, because the overlay index does not keep primary UUIDs for aliased objects.

Appending to an immutable object or a UUID that does not exist.

Multipart range index out of range.

Attempting to read a version not associated with this alias.

405
Method Not Allowed

-

Method specified in the Request-Line was not allowed for the specified resource.

APPEND not allowed for content-encoded objects.

Allow header forbids this method on this object.

406
Not Acceptable

-

Resource requested generates response entities that has content characteristics not specified in the accept headers.

Content-encoding not acceptable, or not found on request or in 'decoderSettings' setting.

407
Proxy Authentication Required

-

Request requires the authentication with the proxy.

408
Request Timeout

-

Client fails to send a request in the time allowed by the server.

409
Conflict

PUT, POST, APPEND, COPY, DELETE

Request was unsuccessful due to a conflict in the state of the resource. Includes the following conditions:

Attempting to create a domain or bucket object which already exists.

Renaming a domain or bucket to a name which already exists.

Attempting to update an immutable object.

Attempting to update an alias object in a domain that does not exist.

Rapid updates of an object, resulting in the error "Later version already exists."

Persisted Content-MD5 did not match value on request.

Basis object is no longer erasure-coded.

Encoding has changed on the basis object since the initiate.

Initialized object must have matching uploadID, which might be updated since the initiate.

410
Gone

GET, HEAD, DELETE

Delete marker.

Erasure-coded object: too few segments found to service request, checksum failure attempting to generate an EC segment, or unable to read sufficient objects to complete request.

411
Length Required

-

Server cannot accept the request without a valid Content-Length header field.

Content-Length must be provided for all non-EC object requests.

Content-Length must be provided and must be zero for COPY request.

412
Precondition Failed

All

Precondition specified in the Request-Header field returns false.

For erasure coding, indicates Swarm cannot recreate the object, listing the missing segments in the body of the response. 

For named objects, indicates that the named object already exists or that the bucket or domain cannot be found. 

For unnamed objects, indicates Swarm did not write the object because the domain does not exist, if cluster.enforceTenancy is set to true.

See .

For replication, indicates that the cluster cannot locate at least two nodes to initially store the replicas. Check the Replica-Count header to verify Swarm creates the correct number of replicas. 

When Swarm initiates a replication request to a PAN and the replication or initial write fails, Swarm fails both procedures and generates a 412. This guarantees that two copies of the object are saved on separate nodes in the cluster before returning a 201 response.

413
Request Entity Too Large

-

Server is not ready to receive the large file and has closed the connection.

See WRITE for Large Files (Expect: 100-continue).

414
Request-URI Too Long

-

Request unsuccessful because the URL specified is longer than the server can process.

415
Unsupported Media Type

-

Request unsuccessful because the entity of the request is in a format not supported by the requested resource.

416
Requested Range not satisfiable

GET

GET request includes invalid Range headers because the request is out of bounds of the data.

Invalid range header, cannot parse.

x-castor-copy-source-range was not satisfiable. Cannot start past the end of the content, and start must be less than the end.

417
Expectation Failed

-

Expectation given in the Expect request-header was not fulfilled by the server.

gencontentmd5 query argument or Expect: Content-MD5 header (deprecated) is not supported for APPEND.

gencontentmd5 query argument or Expect: Content-MD5 header (deprecated) is not allowed on multipart write initiate request.

List operations do not support any 'Expect' headers.

500
Internal Server Error

All

Critical error in Swarm. Check logs for more information and contact DataCore Support if necessary.

Tip

A 500 error is almost always accompanied by a non-500 ‘child’ error with more detail, which is returned in the error headers. See .

501
Not Implemented (Forbidden Feature)

-

Requested method is unsupported in Swarm. Only the methods listed in the Allow header currently work in Swarm.

Erasure coding is not enabled in the configuration.

List operations unavailable because Elasticsearch is not configured or licensed.

List operations require a Search Feed, but none are currently available.

Destination server version is invalid or does not support remote replication.

Destination server is not recognized, or destination server name is not provided.

Destination cluster.name is not set, or differs from expected.

502
Bad Gateway

-

Server received an invalid response from the upstream server while attempting to fulfill the request.

Cannot find a source for RETRIEVE operation.

Castor-System-Cluster header has an invalid cluster name.

503
Service Unavailable (Try Again)

All

Processing was interrupted, so the client should attempt again. Common causes include the following:

  • Swarm cannot complete due to a transient problem or inadequate resources to process the request. 

  • Cluster is too busy to service additional requests. 

  • Gateway cannot communicate with Swarm.

504
Gateway Timeout

-

Upstream server failed to send a request in the time allowed by the server.

Cannot connect to destination.

505
HTTP Version not supported

All

Indicates a request was received with an HTTP version other than HTTP/1.1. Swarm only supports HTTP/1.1.

507
Insufficient Storage Space

PUT, POST, APPEND, COPY

Request cannot be completed because of space limitations or licensing restrictions/errors.

 

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.