我正在尝试使用firebase向/v1/customers/:customer_id/deliveries
端点发布。我正在从一个角度应用程序发送查询参数。
查询对象
{
pickup_name: 'Patrick O',
pickup_phone_number: '619-***-****',
dropoff_name: 'Wendell And Chad',
dropoff_phone_number: '619-***-****',
manifest: 'Cheese',
quote_id: 'Mc26u6TwH_qKkF',
dropoff_address: '4606 Market Street, San Diego, CA',
pickup_address: '1041 Market Street, San Diego, CA'
}
响应(Firebase功能(
Unhandled error { StatusCodeError: 400 - {"kind":"error","code":"invalid_params","message":"The parameters of your request were invalid.","params":{"__all__":"invalid price quote"}}
...
name: 'StatusCodeError',
statusCode: 400,
message: '400 - {"kind":"error","code":"invalid_params","message":"The parameters of your request were invalid.","params":{"__all__":"invalid price quote"}}',
error:
{ kind: 'error',
code: 'invalid_params',
message: 'The parameters of your request were invalid.',
params: { __all__: 'invalid price quote' } }, ...
我在Postmates Api文档中没有遇到__all__
的错误。感谢您的时间和考虑。
通过从查询参数中删除quote_id属性解决了问题
查询对象
{
pickup_name: 'Patrick O',
pickup_phone_number: '619-***-****',
dropoff_name: 'Wendell And Chad',
dropoff_phone_number: '619-***-****',
manifest: 'Cheese',
dropoff_address: '4606 Market Street, San Diego, CA',
pickup_address: '1041 Market Street, San Diego, CA'
}
我还没有测试过,但我相信可以使用quote_id属性,但字符串必须是完整的报价id。
quote_id: 'dqt_Mc26u6TwH_qKkF',
,而不是像我一样的quote_id: 'Mc26u6TwH_qKkF',
。
我将在验证后更新答案