Skip to content

Commit

Permalink
Passthrough query when subquery not implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrichina committed Mar 1, 2024
1 parent 329bb2e commit ce42296
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions json-rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ async function handleQuery({ blockHeight, body }) {
return await callViewFunction({ blockHeight, accountId, methodName, args });
}
}

throw new FastNEARError('notImplemented', `Not implemented: ${body.params.request_type}`, { body });
}

const callViewFunction = async ({ blockHeight, accountId, methodName, args }) => {
Expand Down
1 change: 1 addition & 0 deletions worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const notImplemented = (name) => (...args) => {

const prohibitedInView = (name) => (...args) => {
debug('prohibitedInView', name, 'args', args);
// TODO: Shouldn't this use unique code which is not resulting in proxyJson?
throw new FastNEARError('notImplemented', 'method not available for view calls: ' + name, { methodName: name });
};

Expand Down

0 comments on commit ce42296

Please sign in to comment.