stac-utils / stac-utils/stac-server
When prehook is configured, it throws an exception when the api parsing the response from prehook lambda
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 103
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
There was an release last year that bump the version of aws sdk from version 2 to 3. But in version 3 the lambda response payload is now unit8array (look at the discussion here) , so we need to convert the response before doing JSON.parse()
.e.g.
import { toUtf8 } from '@aws-sdk/util-utf8-node';
const rawHookResult = JSON.parse(toUtf8(invocationResponse.Payload))
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the prehook invocation response handling for the JSON.parse call that reads the Lambda Payload, then review how AWS SDK v3 represents that payload. Verify the response is converted before parsing and that API parsing no longer throws for the Uint8Array payload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, node.js, typescript
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100