firebase-functions
firebase-functions copied to clipboard
OnCall functions does not handle Date in return data
[REQUIRED] Version info
node: 14.17.2
firebase-functions: 3.15.7
firebase-tools: 9.20.0
firebase-admin: 9.12.0
[REQUIRED] Test case
const functions = require("firebase-functions")
module.exports.testFunc = functions.https.onCall((data, req) => ({
d: new Date()
}))
[REQUIRED] Steps to reproduce
- Run emulator
- Make functions request
[REQUIRED] Expected behavior
Response must contain ISO formatted date. Like:
{
"result": {
"d": "2021-10-12T13:11:44.977Z"
}
}
[REQUIRED] Actual behavior
Response must contain ISO formatted date. Like:
{
"result": {
"d": {}
}
}
Dates are not part of the encoding specification for the onCall API. This is still a reasonable feature request. I'll label it as such.