Skip to content

Make "attachment" to the HTTP request non-enumerable #90

@gbrail

Description

@gbrail

The HTTP adapter lets an "attachment" be set on the HTTP request, and if that attachment is a Java object (which it is) then util.inspect will choke on it, like the following:

Script execution failed: Access to Java class "com.apigee.gateway.services.nodescript.internal.RequestState" is prohibited. (util.js#207): at formatValue (util.js:207) at formatProperty (util.js:380) at util.js:299 at formatValue (util.js:298) at formatProperty (util.js:380) at util.js:299 at formatValue (util.js:298) at formatProperty (util.js:380) at util.js:299 at formatValue (util.js:298) at inspect (util.js:140) at /organization/environment/api/hello-world.js:7 at emit (events.js:98) at adaptorhttp.js:536 at domain.js:183 at domain.js:123 at adaptorhttp.js:535 at adaptorhttp.js:606

A more clever workaround would be to patch util.inspect to output reasonable information on Java objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions