     case getImagesFailed(String)
     case addUserRecordFailed(String)
     case requestFailed
-    
+
     var errorDescription: String? {
         switch self {
         case .getTagsFailed: return "Failed to obtain tags from database."

import Dispatch

enum BluePicLocalizedError : LocalizedError {
    
    case getTagsFailed
    case noImagesByTag(String)
    case getAllImagesFailed

   */
  func updateImageJSON(json: JSON, withRequest request: RouterRequest) throws -> JSON {
    var updatedJson = json
    guard let authContext = request.userInfo["mcaAuthContext"] as? AuthorizationContext,
              let contentType = ContentType.sharedInstance.getContentType(forFileName: updatedJson["fileName"].stringValue) else {
      throw ProcessingError.Image("Invalid image document!")
    }
