Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created November 3, 2021 21:20
Show Gist options
  • Save dcomartin/def177fdf60828c8c55b855f8adafd60 to your computer and use it in GitHub Desktop.
Save dcomartin/def177fdf60828c8c55b855f8adafd60 to your computer and use it in GitHub Desktop.
const mappers: HttpProblemExtensionMapper[] = [
{
type: 'https://example.net/validation-error',
map: (object: any) =>
new ProblemDocumentExtension({
'invalid-params': object['invalid-params']
})
}
]
const problemDetails = fromJSON(status400JSON, mappers);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment