geopython / geopython/pygeoapi

return error if unsupported mimetype is requested

Open
#2,374 7 comments 0 reactions 1 assignee Claimed by @tomkralidis View on GitHub
bug
Dominant language
Python
Stars
624
Forks
326
Avg merge
8h 25m
Merged PRs (30d)
2

Description

**Description**
why does pygeoapi return geojson if i send an accept header application/vnd.lala, expected is an error, status 406 requested mimetype not supported, exception could be if no accept header is sent, to return a json or html type encoding.

**Steps to Reproduce**
send header accept:application/vnd.lala to https://demo.pygeoapi.io/master/collections/dutch_castles/items?crs=http://www.opengis.net/def/crs/EPSG/0/28992

**Expected behavior**
error message `requested mimetype not supported`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.