Mark Hildreth

Results 6 comments of Mark Hildreth

@aldas This workaround of duplicating the status logic of the error handler works if you control both the middleware and the error handler. However, if we use custom error handling...

FYI, the Echo project had a [similar issue](https://github.com/labstack/echo/issues/2015#issuecomment-1437809133) with their Recover middleware. They decided to [make a flag](https://github.com/labstack/echo/commit/1e575b7b56d7f1478d889bbd7464f124efe9bc1e) to allow the user to let the error drop through. *Edit:* Although...

@aldas We recently ran into this as well. I believe there is a problem where there isn't a clear understanding of `Committed` amongst those implementing both middleware and custom HTTP...

Before https://github.com/go-gorm/postgres/pull/185/files, when a constraint failed, we were able to detect the constraint name by using the underlying `pgconn.PgError` type. ``` user, err := query.Create(&user) if err != nil {...

@ivila Thanks for the quick response. That makes sense why the code isn't working as epxected, although I will say it's not immediately as a developer that the code is...

> @markhildreth-gravity my recommendation would actually just be to reverse the order of the parameters you pass to `Select()` so its like this: > > ``` > DB.Table("users").Select("age", "name =...