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
This results in an error that is a little cryptic, in my opinion:
FastifyError [Error]: Failed building the serialization schema for GET: /meters, due to error schema is invalid: data.properties should be object
It seems like this mistake could be captured by fastify, and a better error message could be returned to the user? Obviously the best solution is to RTFM correctly, so I understand if this is deemed not worthwhile :)
Steps to Reproduce
Pass a schema directly to response, without specifying a status code:
Prerequisites
Fastify version
3.29
Plugin version
No response
Node.js version
16.x
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.3.1
Description
The current response schema definition is:
I accidentally typed the following:
This results in an error that is a little cryptic, in my opinion:
It seems like this mistake could be captured by fastify, and a better error message could be returned to the user? Obviously the best solution is to RTFM correctly, so I understand if this is deemed not worthwhile :)
Steps to Reproduce
Pass a schema directly to response, without specifying a status code:
Expected Behavior
An error message stating "response schemas should be nested under a response code, e.g { 200: { type: 'object' } }" or similar.
The text was updated successfully, but these errors were encountered: