Error code "Cannot assign value of type 'Void"

error code list
http error codes
error code steam
error code mac
error code -91 fortnite
error code meanings
error code outlook
error code apple

Having trouble with this code to access photos in firebase database. the error I'm getting is "Cannot assign value of type 'Void?' to type 'String!'"

self.fileURL = metadata?.storageReference?.downloadURL(completion: error as! (URL?, Error?) -> Void)
let changeRequestPhoto = user?.user.createProfileChangeRequest()
changeRequestPhoto?.photoURL = NSURL(string: self.fileURL)! as URL
changeRequestPhoto?.commitChanges(completion: {(error) in         
    if let error = error {
        print (error.localizedDescription)
        return
    }
    else {
        print ("Sweet!")
    }               
})

The error says that downloadURL has no return value. It uses a completion handler to return data from an asynchronous task

I'm not familiar with Firebase but the syntax of the API seems to be

metadata?.storageReference?.downloadURL( completion: { (url, error) in
    let changeRequestPhoto = user?.user.createProfileChangeRequest()
    changeRequestPhoto?.photoURL = url
    changeRequestPhoto?.commitChanges(completion: { error in
        if let error = error {
            print (error.localizedDescription)
            return
        }
        else {
            print ("Sweet!")
        }
    })
})

What is an Error Code?, status response code that is reserved for future use. Sometimes, this code indicates that the request can not be processed until the client makes a payment. A complete list of system error codes, from code 1 through 15841. Here, too, are meanings for each system error code, plus other ways they may appear.

On the first line, I'm assuming self.fileURL is the String you're referencing, but you are attempting to assign to it the output of metadata?.storageReference?.downloadURL which returns Void.

You'll need to grab the url from the completion block, as seen below. Note, this example is taken directly from Firebase's documentation

starsRef.downloadURL { url, error in
  if let error = error {
    // Handle any errors
  } else {
    // Get the download URL for 'images/stars.jpg'
  }
}

I am getting error code 443 in the error log! What does it mean and , HTTP status codes and how to use them in RESTful API or Web Services. 4xx Client Error. The 4xx class of status code is intended for cases in which the client​  This section is intended for developers who are debugging system errors. If you reached this page while searching for other errors, here are some links that might help: Windows Update errors - For help resolving issues with Windows Update. Windows activation errors - For help verifying your copy of Windows. Troubleshooting blue screen errors

You need to add proper completion handling for the first row

self.fileURL = metadata?.storageReference?.downloadURL(completion: { (url, error) in
    if (error == nil) {
       //do something with the url
    } else {
      // error handling
    }
 })

402 Payment Required, Provides links to system error codes defined in the WinError.h header file and is intended for developers. This article does not cite any sources. Please help improve this article by adding citations to reliable sources.Unsourced material may be challenged and removed August 2012) (Learn how and when to remove this template message)

List of HTTP status codes, HTTP Status Code directory, with definitions, details and helpful code references. 4×× Client Error. 400 Bad Request · 401 Unauthorized · 402 Payment  Applies to: Windows 10 Pro released in July 2015 Windows 8 Windows 8 Enterprise Windows 8 Pro Windows 8.1 Windows 8.1 Enterprise Windows 8.1 Pro Windows 7 Enterprise Windows 7 Home Basic Windows 7 Home Premium Windows 7 Professional Windows 7 Starter Windows 7 Ultimate Windows Server 2008 Datacenter Windows Server 2008 Datacenter without Hyper-V Windows Server 2008 Enterprise Windows Server

HTTP response status codes, There could be more than one reason for an HTTP error response code. It might occur because a web page is no longer available (404 not found)  ERROR_BAD_ENVIRONMENT. 10 (0xA) The environment is incorrect. ERROR_BAD_FORMAT. 11 (0xB) An attempt was made to load a program with an incorrect format. ERROR_INVALID_ACCESS. 12 (0xC) The access code is invalid. ERROR_INVALID_DATA. 13 (0xD) The data is invalid. ERROR_OUTOFMEMORY. 14 (0xE) Not enough storage is available to complete this

HTTP Status Codes, 10.4 Client Error 4xx. The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD request, the  To fix, start by opening the Run dialog box. This can be done by pressing the Windows key and R simultaneous. Run is listed, and click it to open the box. Once you open it, type Regedit in the dialog box and click OK. This allows you to open the Registry Editor. Now that you are in the Registry Editor, type in HKEY_LOCAL_MACHINE\SOFTWARE