Exporting WriteErrorResponse

This commit is contained in:
Frederick F. Kautz IV
2015-04-26 16:28:21 -07:00
parent 3fb4f2894d
commit e05d46a0b5
4 changed files with 34 additions and 33 deletions
+2 -1
View File
@@ -109,7 +109,8 @@ func generateObjectsListResult(bucket string, objects []drivers.ObjectMetadata,
return data
}
func writeErrorResponse(w http.ResponseWriter, req *http.Request, errorType int, acceptsContentType contentType, resource string) {
// WriteErrorResponse writes a formatted error to the user
func WriteErrorResponse(w http.ResponseWriter, req *http.Request, errorType int, acceptsContentType contentType, resource string) {
error := getErrorCode(errorType)
errorResponse := getErrorResponse(error, resource)
// set headers