Skip to content

Field url is required for type with serial name com.saveourtool.osv4k.Reference, but it was missing #2987

@0x6675636b796f75676974687562

Description

Occurs when uploading certain OSV JSON files (needs to be forwarded to saveourtool/cosv4k).

Examples:

  • CAN-2022-1000071
  • CAN-2023-1000000
18:02:10.937 [boundedElastic-187] ERROR c.s.cosv.backend.service.CosvService - Failed to process raw COSV file with id: 15467 kotlinx.serialization.MissingFieldException: Field 'url' is required for type with serial name 'com.saveourtool.osv4k.Reference', but it was missing
	at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20)
	at com.saveourtool.osv4k.Reference.<init>(OsvSchema.kt:890)
	at com.saveourtool.osv4k.Reference$$serializer.deserialize(OsvSchema.kt:890)
	at com.saveourtool.osv4k.Reference$$serializer.deserialize(OsvSchema.kt:890)
	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:77)

image

This seems like a rather frequent error, so we need to either replace the missing url field with a dummy value, or fix this in saveourtool/cosv4k and upgrade:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions