serverpod / serverpod

Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem.
BSD 3-Clause "New" or "Revised" License
2.3k stars 200 forks source link

fix: Only silence exceptions for unmatched class types #2244

Closed klkucaj closed 2 weeks ago

klkucaj commented 2 weeks ago

Closes: #2133

Pre-launch Checklist

Changes:

This PR introduces the DeserializationTypeNotFoundException exception. When deserializing an object, we iterate through all ServerPod protocol dependencies to find a matching class type. If no match is found within a protocol, a DeserializationTypeNotFoundException is thrown. In these cases, we should silently continue to check other protocols. However, this behavior should only apply when this specific exception is thrown, not when a match is found but the data is invalid.