Skip to content

Commit

Permalink
Merge pull request #771 from BitGo/DX-420-better-nesting-error-message
Browse files Browse the repository at this point in the history
refactor(openapi-generator): improve error message for reaching the deepest allowed nest
  • Loading branch information
bitgopatmcl authored May 24, 2024
2 parents 1163bd9 + 7bba090 commit 5336a24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/openapi-generator/src/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ function codecIdentifier(
} else if (id.type === 'MemberExpression') {
const object = id.object;
if (object.type !== 'Identifier') {
if (object.type === 'MemberExpression')
return E.left(
`Object ${((object as swc.MemberExpression) && { value: String }).value} is deeply nested, which is unsupported`,
);
return E.left(`Unimplemented object type ${object.type}`);
}

Expand Down

0 comments on commit 5336a24

Please sign in to comment.