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
Raise errors in APIs instead of creating different JsonResponses within the endpoint logic.
As part of this, we should also be updating how we validate payload data for the endpoint.
The way we do validation now is really imperative, we should look at a better, more declarative way to do it.
NftStorage uses @cfworker/json-schema, it seems like what we're looking for, and also would help keeping consistency with NFT.storage.
Yes, we have a /api/errors.js file where this should live. We will also be adding better debuggability with logtail and it would be good to centralize everything there.
Raise errors in APIs instead of creating different JsonResponses within the endpoint logic.
As part of this, we should also be updating how we validate payload data for the endpoint.
The way we do validation now is really imperative, we should look at a better, more declarative way to do it.
NftStorage uses
@cfworker/json-schema
, it seems like what we're looking for, and also would help keeping consistency with NFT.storage.#726 (comment)
#726 (comment)
The text was updated successfully, but these errors were encountered: