Skip to content

Commit 00a80e4

Browse files
Added error class (#4589)
* Added error class * review
1 parent 1c3fbee commit 00a80e4

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
TYPES: #eg-4579 Error
2+
3+
PRE-MARKUP:
4+
5+
<code>Out of Cheese Error: DEADBEEF</code>
6+
7+
MICRODATA:
8+
9+
N/A
10+
11+
RDFA:
12+
13+
N/A
14+
15+
JSON:
16+
17+
<script type="application/ld+json">
18+
{
19+
"@context": "https://schema.org/",
20+
"@type": "Error",
21+
"timestamp": "2025-11-17T18:23:00Z",
22+
"description": "Out of Cheese Error",
23+
"source": {
24+
"@type": "SoftwareApplication",
25+
"name": "Cheese Machine"
26+
},
27+
"errorCode": "DEADBEEF"
28+
}
29+
</script>

data/ext/pending/issue-4579.ttl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@prefix : <https://schema.org/> .
2+
@prefix hydra: <http://www.w3.org/ns/hydra/core#> .
3+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
4+
@prefix prov: <http://www.w3.org/ns/prov#> .
5+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
6+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
7+
@prefix sarif: <http://sarif.info/> .
8+
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
9+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
10+
11+
:Error a rdfs:Class ;
12+
rdfs:label "Error" ;
13+
:isPartOf <https://pending.schema.org> ;
14+
:source <https://github.com/schemaorg/schemaorg/issues/4579> ;
15+
rdfs:comment "Representation of an Error." ;
16+
owl:equivalentClass hydra:Error ;
17+
rdfs:subClassOf sarif:Result ;
18+
rdfs:subClassOf :InstantaneousEvent .
19+
20+
:errorCode a rdf:Property ;
21+
rdfs:label "errorCode" ;
22+
rdfs:comment "Application or platform dependant error code." ;
23+
:domainIncludes :Error ;
24+
:rangeIncludes :Text, :Integer, :DefinedTerm , :StatusEnumeration ;
25+
rdfs:seeAlso hydra:statusCode .

data/schema.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6021,7 +6021,7 @@ This property should not be used where the nature of the alignment can be descri
60216021

60226022
:error a rdf:Property ;
60236023
rdfs:label "error" ;
6024-
rdfs:comment "For failed actions, more information on the cause of the failure." ;
6024+
rdfs:comment "For failed actions, more information on the cause of the failure. Consider using the Error type." ;
60256025
:domainIncludes :Action ;
60266026
:rangeIncludes :Thing .
60276027

0 commit comments

Comments
 (0)