···251251 // we'll wait for inclusion until the context deadline expires
252252 // in practice we expect operations to be included in about one second
253253 result, err := s.mempoolSubmitter.BroadcastTx(r.Context(), txBytes, true)
254254- // TODO more robust error handling
254254+ if errors.Is(err, context.DeadlineExceeded) {
255255+ s.logger.Error("PLC server returning gateway timeout", "did", did, "error", stacktrace.Propagate(err))
256256+ sendErrorResponse(w, http.StatusGatewayTimeout, "Timed out waiting for transaction inclusion. You may safely retry the exact same request.")
257257+ return
258258+ }
255259 if s.handlePLCError(w, err, "") {
256260 return
257261 }