Skip to content

Commit ef1f2c0

Browse files
committed
fix few 500 errros
1 parent d95e4bd commit ef1f2c0

File tree

4 files changed

+207
-30
lines changed

4 files changed

+207
-30
lines changed

api/openapi.json

+15
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@
184184
"schema": {
185185
"default": 1000,
186186
"maximum": 1000,
187+
"minimum": 1,
187188
"type": "integer"
188189
}
189190
},
@@ -256,6 +257,7 @@
256257
"required": false,
257258
"schema": {
258259
"default": 0,
260+
"minimum": 0,
259261
"type": "integer"
260262
}
261263
},
@@ -5613,6 +5615,7 @@
56135615
"schema": {
56145616
"example": 100,
56155617
"maximum": 1000,
5618+
"minimum": 1,
56165619
"type": "integer"
56175620
}
56185621
},
@@ -5798,6 +5801,7 @@
57985801
"schema": {
57995802
"example": 100,
58005803
"maximum": 1000,
5804+
"minimum": 1,
58015805
"type": "integer"
58025806
}
58035807
},
@@ -5874,6 +5878,7 @@
58745878
"schema": {
58755879
"example": 100,
58765880
"maximum": 1000,
5881+
"minimum": 1,
58775882
"type": "integer"
58785883
}
58795884
},
@@ -5995,6 +6000,7 @@
59956000
"schema": {
59966001
"example": 100,
59976002
"maximum": 1000,
6003+
"minimum": 1,
59986004
"type": "integer"
59996005
}
60006006
},
@@ -6143,6 +6149,7 @@
61436149
"default": 100,
61446150
"example": 100,
61456151
"maximum": 1000,
6152+
"minimum": 1,
61466153
"type": "integer"
61476154
}
61486155
}
@@ -6386,6 +6393,7 @@
63866393
"example": 100,
63876394
"format": "int32",
63886395
"maximum": 1000,
6396+
"minimum": 1,
63896397
"type": "integer"
63906398
}
63916399
}
@@ -7072,6 +7080,7 @@
70727080
"default": 100,
70737081
"example": 100,
70747082
"maximum": 1000,
7083+
"minimum": 1,
70757084
"type": "integer"
70767085
}
70777086
}
@@ -7135,6 +7144,7 @@
71357144
"default": 100,
71367145
"example": 100,
71377146
"maximum": 1000,
7147+
"minimum": 1,
71387148
"type": "integer"
71397149
}
71407150
}
@@ -7280,6 +7290,7 @@
72807290
"example": 15,
72817291
"format": "int32",
72827292
"maximum": 1000,
7293+
"minimum": 1,
72837294
"type": "integer"
72847295
}
72857296
},
@@ -7290,6 +7301,7 @@
72907301
"default": 0,
72917302
"example": 10,
72927303
"format": "int32",
7304+
"minimum": 0,
72937305
"type": "integer"
72947306
}
72957307
}
@@ -8374,6 +8386,7 @@
83748386
"example": 15,
83758387
"format": "int32",
83768388
"maximum": 1000,
8389+
"minimum": 1,
83778390
"type": "integer"
83788391
}
83798392
},
@@ -8384,6 +8397,7 @@
83848397
"default": 0,
83858398
"example": 10,
83868399
"format": "int32",
8400+
"minimum": 0,
83878401
"type": "integer"
83888402
}
83898403
}
@@ -8530,6 +8544,7 @@
85308544
"schema": {
85318545
"example": 100,
85328546
"maximum": 1000,
8547+
"minimum": 1,
85338548
"type": "integer"
85348549
}
85358550
},

api/openapi.yml

+15
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ paths:
241241
maximum: 1000
242242
default: 100
243243
example: 100
244+
minimum: 1
244245
responses:
245246
'200':
246247
description: blockchain account transactions
@@ -597,6 +598,7 @@ paths:
597598
type: integer
598599
example: 100
599600
maximum: 1000
601+
minimum: 1
600602
- name: start_date
601603
in: query
602604
required: false
@@ -645,6 +647,7 @@ paths:
645647
type: integer
646648
example: 100
647649
maximum: 1000
650+
minimum: 1
648651
- name: start_date
649652
in: query
650653
required: false
@@ -719,6 +722,7 @@ paths:
719722
type: integer
720723
example: 100
721724
maximum: 1000
725+
minimum: 1
722726
- name: start_date
723727
in: query
724728
required: false
@@ -774,6 +778,7 @@ paths:
774778
type: integer
775779
example: 100
776780
maximum: 1000
781+
minimum: 1
777782
- name: start_date
778783
in: query
779784
required: false
@@ -838,6 +843,7 @@ paths:
838843
maximum: 1000
839844
default: 100
840845
example: 100
846+
minimum: 1
841847
responses:
842848
'200':
843849
description: account's traces
@@ -1064,13 +1070,15 @@ paths:
10641070
maximum: 1000
10651071
default: 100
10661072
example: 15
1073+
minimum: 1
10671074
- name: offset
10681075
in: query
10691076
schema:
10701077
type: integer
10711078
format: int32
10721079
default: 0
10731080
example: 10
1081+
minimum: 0
10741082
responses:
10751083
'200':
10761084
description: nft collections
@@ -1174,6 +1182,7 @@ paths:
11741182
type: integer
11751183
example: 100
11761184
maximum: 1000
1185+
minimum: 1
11771186
- name: start_date
11781187
in: query
11791188
required: false
@@ -1278,6 +1287,7 @@ paths:
12781287
example: 100
12791288
default: 100
12801289
maximum: 1000
1290+
minimum: 1
12811291
responses:
12821292
'200':
12831293
description: account inscriptions history
@@ -1318,6 +1328,7 @@ paths:
13181328
example: 100
13191329
default: 100
13201330
maximum: 1000
1331+
minimum: 1
13211332
responses:
13221333
'200':
13231334
description: account inscriptions history
@@ -1410,13 +1421,15 @@ paths:
14101421
maximum: 1000
14111422
default: 100
14121423
example: 15
1424+
minimum: 1
14131425
- name: offset
14141426
in: query
14151427
schema:
14161428
type: integer
14171429
format: int32
14181430
default: 0
14191431
example: 10
1432+
minimum: 0
14201433
responses:
14211434
'200':
14221435
description: a list of jettons
@@ -2569,13 +2582,15 @@ components:
25692582
type: integer
25702583
default: 1000
25712584
maximum: 1000
2585+
minimum: 1
25722586
offsetQuery:
25732587
in: query
25742588
name: offset
25752589
required: false
25762590
schema:
25772591
type: integer
25782592
default: 0
2593+
minimum: 0
25792594
domainFilterQuery:
25802595
in: query
25812596
name: tld

pkg/api/account_handlers.go

+3
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ func (h *Handler) GetAccountPublicKey(ctx context.Context, params oas.GetAccount
285285
}
286286
if err != nil {
287287
state, err := h.storage.GetRawAccount(ctx, account.ID)
288+
if errors.Is(err, core.ErrEntityNotFound) {
289+
return nil, toError(http.StatusNotFound, err)
290+
}
288291
if err != nil {
289292
return nil, toError(http.StatusInternalServerError, err)
290293
}

0 commit comments

Comments
 (0)