Unknown directory type causes deserialization failure
Closed this issue · 5 comments
We are getting the following error:
java.security.SignatureException: Invalid signature: Cannot deserialize value of type `com.workos.directorysync.models.DirectoryType` from String "onelogin scim v2.0": not one of the values accepted for Enum class: [...]
It seems like it's probably bad design to use a java enum for a dynamic field like this in a client library since java enums aren't able to represent unknown values.
Obviously a short term fix is to just add the enum variant for onelogin, but I think you should consider making this field a String.
Another idea is to use one of these techniques: https://blog.wpanas.eu/posts/best-way-to-handle-unkown-enum-values-using-jackson/
Thanks @singron for the report. For the time being we can add the missing type to unblock you.
The team and I will discuss potential approaches to make this more resilient in the future.
v1.2.1 has been published: https://search.maven.org/artifact/com.workos/workos/1.2.1/jar
Any update on this? The same thing happened again.