[Promise] - Modified reject and resolve methods to include an optional code value, for network requests where an additional code might be helpful