Repository Public MIT Research preview
1% S10-F04 — Que faire de l'issue d'un appel ? Arbre de décision de la séance.2% Idée : la question n'est pas « a-t-il échoué ? » mais « répéter peut-il réparer, et sans danger ? ».3% Les codes de chaque classe et la politique de recul viennent du code (S10-F04-donnees.tex).4% C'est la politique choisie pour le cours, fondée sur les définitions de la RFC 9110, pas une norme.5\input{S10-F04-donnees.tex}%6\begin{tikzpicture}[x=1mm, y=1mm]7 \node[atlas block strong, text width=14mm, minimum height=13mm] (o) at (9.5,26) {\textbf{Issue}\\ de l'appel};8 % Trois familles d'issues9 \node[atlas block valid, text width=31mm, minimum height=9mm] (s) at (46,44.5) {\textbf{2xx}\\ la requête a réussi};10 \node[atlas block uncertain, text width=31mm, minimum height=12mm] (t) at (46,26)11 {\textbf{\AtlasFigErrReessayables}\\ ou délai dépassé};12 \node[atlas block hazard, text width=31mm, minimum height=12mm] (d) at (46,7) {\textbf{\AtlasFigErrDefinitifs}};13 \draw[atlas arrow] (o.east) -- ++(4,0) |- (s.west);14 \draw[atlas arrow] (o.east) -- (t.west);15 \draw[atlas arrow] (o.east) -- ++(4,0) |- (d.west);16 % Issues17 \node[atlas block valid, text width=52mm, minimum height=9mm] (rs) at (112.5,44.5)18 {\textbf{Succès} : rendre le résultat au modèle};19 \node[atlas block hazard, text width=52mm, minimum height=12mm] (rd) at (112.5,7)20 {\textbf{Définitive} : ne pas répéter ; corriger la requête, la clé ou la permission};21 \draw[atlas arrow valid] (s) -- (rs);22 \draw[atlas arrow hazard] (d) -- (rd);23 \node[atlas gate, text width=17mm] (g) at (81,26) {Idempotent ou clé ?};24 \draw[atlas arrow] (t) -- (g);25 \node[atlas block flow, text width=33mm, minimum height=9mm] (ro) at (122.5,32.6)26 {\textbf{Réessayer}, \AtlasFigErrTentativesMax\ tentatives au plus ; recul \AtlasFigErrReculs~s};27 \node[atlas block uncertain, text width=33mm, minimum height=9mm] (rn) at (122.5,19.4)28 {\textbf{Issue inconnue} : vérifier, ne pas répéter};29 \draw[atlas arrow] (g.east) -- ++(3,0) |- node[atlas note, pos=.78, above] {oui} (ro.west);30 \draw[atlas arrow] (g.east) -- ++(3,0) |- node[atlas note, pos=.78, below] {non} (rn.west);31\end{tikzpicture}32