You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FunctionsError loses message when serialized with JSON.stringify() #2225
When you JSON.stringify() a FunctionsError (or any of its subclasses), the message property gets silently dropped from the output.
consterr=newFunctionsHttpError('Edge Function returned a non-2xx status code','FunctionsHttpError',{status: 500})console.log(JSON.stringify(err))// {"name":"FunctionsHttpError","context":{"status":500}}// "message" is missing
This happens because Error.prototype.message is non-enumerable, so JSON.stringify() skips it.
The other error classes in this monorepo already handle this with a toJSON() override:
Activity