COLA
COLA
Explore posts from servers
CC#
Created by COLA on 11/19/2023 in #help
Issues trying to create new error types
Thanks for the help 🙂
15 replies
CC#
Created by COLA on 11/19/2023 in #help
Issues trying to create new error types
Removing the required did the trick. I have warninng about property being maybe unset, but that's someone else problem
15 replies
CC#
Created by COLA on 11/19/2023 in #help
Issues trying to create new error types
They are required per the spec, I would have prefered if it was forced by the compiler to the consumers of the API, but I'm not going to fret too much if it's not possible
15 replies
CC#
Created by COLA on 11/19/2023 in #help
Issues trying to create new error types
I'll give this a try when my Visual Studio update is finished, thanks 🙂
15 replies
CC#
Created by COLA on 11/19/2023 in #help
Issues trying to create new error types
even when doing
c#

public class unknownCapabilityException : RFC8807Error
{
public unknownCapabilityException(string detail, int status = 400)
{
base.type = "urn:ietf:params:jmap:error:unknownCapability";
base.title = "Unknown Capability";
base.detail = detail;
base.status = status;
}
}

...

var errorValue = new unknownCapabilityException(errorDetail, 405);
c#

public class unknownCapabilityException : RFC8807Error
{
public unknownCapabilityException(string detail, int status = 400)
{
base.type = "urn:ietf:params:jmap:error:unknownCapability";
base.title = "Unknown Capability";
base.detail = detail;
base.status = status;
}
}

...

var errorValue = new unknownCapabilityException(errorDetail, 405);
I get the same error message. Even worse, now even detail is undefined.
15 replies