We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd43f6b commit c928250Copy full SHA for c928250
sqlx-core/src/postgres/copy.rs
@@ -262,15 +262,18 @@ impl<C: DerefMut<Target = PgConnection>> PgCopyIn<C> {
262
"fail_with: expected ErrorResponse, got: {:?}",
263
msg.format
264
)),
265
- Err(Error::Database(e)) => match e.code() {
266
- Some(Cow::Borrowed("57014")) => {
267
- conn.stream
268
- .recv_expect(MessageFormat::ReadyForQuery)
269
- .await?;
270
- Ok(())
+ Err(Error::Database(e)) => {
+ match e.code() {
+ Some(Cow::Borrowed("57014")) => {
+ // postgres abort received error code
+ conn.stream
+ .recv_expect(MessageFormat::ReadyForQuery)
271
+ .await?;
272
+ Ok(())
273
+ }
274
+ _ => Err(Error::Database(e)),
275
}
- _ => Err(Error::Database(e)),
- },
276
277
Err(e) => Err(e),
278
279
0 commit comments