Skip to content

Server error data should NOT be sent to the client #132

@kevmoo

Description

@kevmoo

Currently at d71e331

There seems to be logic that sends a toString() or similar of unknown exceptions to the client.

This should be FORBIDDEN. Unless the developer throws a specific error intended to be used as an HTTP exception, a blank 500 should be sent to the user.

In these cases, a LOG should be printed about the unexpected error type.

I wonder if some of this might be helpful

https://pub.dev/documentation/google_cloud/latest/google_cloud/createLoggingMiddleware.html

https://github.com/GoogleCloudPlatform/functions-framework-dart/blob/main/google_cloud/lib/src/logging.dart

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions