Twirp

Latest version: v0.0.7

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 7

5.10.1

This patch release fixes a bug where the generated Go code uses an incorrect package name for `net/http` when the package is aliased.

5.10.0

This release includes two PRs:

198 adds ClientHooks. These are a structure that can be passed to client constructors to hook off of client request lifecycle events. This can be used to build standard tools for logging, monitoring, or authorization steps in all outbound calls.

201 fixes the Twirp library WriteError function to return an error value instead of swallowing the error.

5.9.0

This release includes three changes.
- 192 added a new `github.com/twitchtv/twirp.WriteError` function to the main Twirp library. This should help users write general code that plays well in a broader Twirp ecosystem.
- 193 fixes Twirp client behavior when a server responds with an error that is JSON-encoded, but not a valid Twirp error. Now, the client should provide a more meaningful error message in this case.
- 191 fixes a documentation comment in github.com/twitchtv/twirp/hooks/statsd.

5.8.0

This release adds a new error code, `malformed`, which the server returns if a client's message is not deserializable without errors. This error gets a 400 HTTP Status Code. This should make it easier to filter out bad hand-written clients from server error monitoring.

This was 182.

5.7.0

This release includes two changes to make panics easier to handle in Twirp servers, as well as a minor bug fix to correct 171.

First, panics are now propagated to Error hooks, allowing application owners to add instrumentation around them. Panics will be wrapped with as `twirp.Error`s, but will support a `Cause() error` method, so you can use [github.com/pkg/errors](https://github.com/pkg/errors) to retrieve the root cause of errors in hooks. This was implemented in #160.

Second, Twirp servers now flush error responses when panicking, so that clients always get the message, and don't see a broken pipe if the server crashes due to the panic. In addition, Twirp servers now set Content-Length on all responses, so clients can be sure they have received the _complete_ message. This was implemented in 168.

Finally, `protoc-gen-twirp` now generated correct code for service definitions with no methods. This was implemented in 171.

5.6.0

This release adds a new method to generated servers. They now support a `PathPrefix() string` method which returns the path that all of their routes are prefixed with. This should let users of Twirp build better libraries around registration of Twirp services.

Page 3 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.