Commit 74bceb4
authored
Improve the logging for duplicate device identifier connection errors (#2285)
Improve the logging for duplicate device identifiers from:
```
2025-08-14T00:45:50Z app[48e4199b764518] iad level=info msg="Device auth failed" reason="{:error, #Ecto.Changeset<action: :insert, changes: %{status: :registered, extensions: #Ecto.Changeset<action: :insert, changes: %{}, errors: [], data: #NervesHub.Extensions.DeviceExtensionsSetting<>, valid?: true, ...>, identifier: \"abc123\", org_id: 123, priority_updates: false, product_id: 123, update_attempts: [], updates_enabled: true}, errors: [identifier: {\"has already been taken\", [constraint: :unique, constraint_name: \"devices_identifier_index\"]}], data: #NervesHub.Devices.Device<>, valid?: false, ...>}" auth=shared_secrets event=nerves_hub.devices.invalid_auth product_key=nhp_abc123
```
to
```
2025-08-14T00:45:50Z app[48e4199b764518] iad [info]ts=2025-08-14T00:45:50.910 level=info msg="Device auth failed" auth=shared_secrets event=nerves_hub.devices.invalid_auth org_id=123 product_id=123 identifier=abc123
```
and expired shared secret signatures from:
`reason="{:error, :expired}"` to `reason="signature_expired"`1 parent 50fe3d5 commit 74bceb4
File tree
3 files changed
+33
-4
lines changed- lib
- nerves_hub_web/channels
- nerves_hub
3 files changed
+33
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
108 | 134 | | |
109 | 135 | | |
110 | 136 | | |
111 | 137 | | |
112 | | - | |
| 138 | + | |
113 | 139 | | |
114 | 140 | | |
115 | 141 | | |
| |||
121 | 147 | | |
122 | 148 | | |
123 | 149 | | |
124 | | - | |
| 150 | + | |
125 | 151 | | |
126 | 152 | | |
127 | 153 | | |
| |||
0 commit comments