Skip to content

serverless-schema-management updateSchema bypasses handleSchemaError #33

Description

@jstirnaman

Problem

updateSchema in src/services/serverless-schema-management.service.ts has its own inline error handler (lines 347-356) that does not call handleSchemaError. It uses JSON.stringify(error.response.data) instead of extracting the human-readable message.

All other methods in this service correctly delegate to handleSchemaError, which extracts data.message, data.error, plain-text strings, etc.

Expected behavior

updateSchema should delegate to handleSchemaError like the other methods, so Cloud Serverless {"code":"...","message":"..."} errors are surfaced as readable messages instead of raw JSON blobs.

Affected code

src/services/serverless-schema-management.service.ts lines 347-356 (inline catch in updateSchema)

Compare with handleSchemaError at line 362 which correctly handles all error formats.

Context

Found during error handling audit in PR #31.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions