Skip to content

Commit

Permalink
API-41844: Swap parameter for header in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kristen-brown committed Nov 25, 2024
1 parent b554e36 commit e39927d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def validate_receipt_date_header!
title: I18n.t('appeals_api.errors.titles.validation_error'),
detail: I18n.t('appeals_api.errors.receipt_date_too_early'),
source: {
parameter: 'receiptDate'
header: 'X-VA-Receipt-Date'
},
status: '422'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def validate_receipt_date_header!
title: I18n.t('appeals_api.errors.titles.validation_error'),
detail: I18n.t('appeals_api.errors.receipt_date_too_early'),
source: {
parameter: 'receiptDate'
header: 'X-VA-Receipt-Date'
},
status: '422'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
"title": "Validation error",
"detail": "Receipt date cannot be before 2019-02-20",
"source": {
"parameter": "receiptDate"
"header": "X-VA-Receipt-Date"
},
"status": "422"
}
Expand Down Expand Up @@ -1438,7 +1438,7 @@
"title": "Validation error",
"detail": "Receipt date cannot be before 2019-02-20",
"source": {
"parameter": "receiptDate"
"header": "X-VA-Receipt-Date"
},
"status": "422"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
"title": "Validation error",
"detail": "Receipt date cannot be before 2019-02-20",
"source": {
"parameter": "receiptDate"
"header": "X-VA-Receipt-Date"
},
"status": "422"
}
Expand Down Expand Up @@ -1438,7 +1438,7 @@
"title": "Validation error",
"detail": "Receipt date cannot be before 2019-02-20",
"source": {
"parameter": "receiptDate"
"header": "X-VA-Receipt-Date"
},
"status": "422"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
error = JSON.parse(response.body)['errors'][0]
expect(error['title']).to eql('Validation error')
expect(error['detail']).to eql('Receipt date cannot be before 2019-02-20')
expect(error['source']['parameter']).to eql('receiptDate')
expect(error['source']['header']).to eql('X-VA-Receipt-Date')
expect(error['status']).to eql('422')
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
error = JSON.parse(response.body)['errors'][0]
expect(error['title']).to eql('Validation error')
expect(error['detail']).to eql('Receipt date cannot be before 2019-02-20')
expect(error['source']['parameter']).to eql('receiptDate')
expect(error['source']['header']).to eql('X-VA-Receipt-Date')
expect(error['status']).to eql('422')
end
end
Expand Down

0 comments on commit e39927d

Please sign in to comment.